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

Nico Golde osmocom at ngolde.de
Tue Sep 18 13:40:56 CEST 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
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gsm_utils.c-cleanup-do-not-use-dynamic-memory-when-d.patch
Type: text/x-diff
Size: 2400 bytes
Desc: not available
URL: <http://lists.osmocom.org/pipermail/baseband-devel/attachments/20120918/a143aaba/attachment.patch>


More information about the baseband-devel mailing list