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

Nico Golde osmocom at ngolde.de
Tue Sep 18 11:40:56 UTC 2012


Hi,
* Holger Hans Peter Freyther <holger at freyther.de> [2012-09-18 13:25]:
> On Mon, Sep 17, 2012 at 06:30:38PM +0200, Nico Golde wrote:
> > -	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.

New patch attached.

Cheers
Nico
> 


More information about the baseband-devel mailing list