[PATCH] gsm_utils.c: cleanup + do not use dynamic memory when decoding 7bit messages

Holger Hans Peter Freyther holger at freyther.de
Mon Sep 17 21:40:34 UTC 2012


On Mon, Sep 17, 2012 at 06:30:38PM +0200, Nico Golde wrote:
> This is a bit selfish, as I personally need it :)

the best patches. :)
> 
> Cheers
> Nico
> 
>  
> -	uint8_t *rtext = calloc(septet_l, sizeof(uint8_t));
> -	uint8_t tmp;
> +	uint8_t data[160];
> +	uint8_t ext_septet;


could you please add a check for septet_l >= sizeof(data) and log
an error? I don't remember right now if we use this routine for USSD
or not.





More information about the baseband-devel mailing list