Pau Espin
c63971fab0
The code in OCTET8 implementation assumes the len is placed inside the byte preceding the memory buffer, which is true for the defined cases. However, it creates a compilation warning. Better pass the value directly from the struct field rather than playing addr games. this way we also assert we require to explicitly pass the len. Fixes lots of warning like the one below: /home/pespin/dev/sysmocom/bin/../git/libsmpp34/src/smpp34_unpack.c: In function ‘smpp34_u npack’: /home/pespin/dev/sysmocom/bin/../git/libsmpp34/src/smpp34_unpack.c:147:14: warning: array subscript is above array bounds [-Warray-bounds] lenval = *((inst par) - 1);\ ^~~~~~~~~~~~~~~~~ /home/pespin/dev/sysmocom/bin/../git/libsmpp34/def_frame/submit_sm.frame:18:2: note: in e xpansion of macro ‘OCTET8’ OCTET8( instancia, short_message, 254 ); ^~~~~~ Change-Id: Id110f4e977c3becdb44cf5492c372e530ea51551 |
||
---|---|---|
.. | ||
Makefile.am | ||
smpp34.h | ||
smpp34_dumpBuf.c | ||
smpp34_dumpPdu.c | ||
smpp34_pack.c | ||
smpp34_params.c | ||
smpp34_params.h | ||
smpp34_structs.c | ||
smpp34_structs.h | ||
smpp34_unpack.c |