Re: [PATCH] make SMPP's PDU parsing more robust

Stipe Tolj <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization Wapme Systems AG
Message-ID <[email protected]>
> BTW, after sending this patch I found a small BUG ;)
> 
> +        {   /* Read optional parameters */                             \
> +            while (pos+4 < len) {                                           \
>                                 ^^^^
> Here must be:
> +        {   /* Read optional parameters */                             \
> +            while (pos+4 <= len) {                                          \
> 
> Because it is OK if length of value is 0. Old version will work for most
> optional parameters , but not for opt. parameters with length of value = 0.
> Corrected patch attached. Sorry for this...

no problem. In general it's more practible when you re-send the whole
patch as clean diff (with your fix included). 

Stipe

[email protected]
-------------------------------------------------------------------
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf

Tel: +49-211-74845-0
Fax: +49-211-74845-299

E-Mail: [email protected]
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.