libsmpp34/src
Pau Espin c63971fab0 Fix Out of bounds compilation warning in OCTET8
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
2017-09-15 20:24:25 +02:00
..
Makefile.am initial import of libsmpp34-1.10 2012-11-07 08:32:31 +01:00
smpp34.h add delivery receipt definitions 2017-08-14 10:37:48 +02:00
smpp34_dumpBuf.c smpp34_dumpBuf.c: remove unused variable 2017-09-15 20:24:16 +02:00
smpp34_dumpPdu.c Fix Out of bounds compilation warning in OCTET8 2017-09-15 20:24:25 +02:00
smpp34_pack.c Fix Out of bounds compilation warning in OCTET8 2017-09-15 20:24:25 +02:00
smpp34_params.c misc: Always include stdint.h as it is almost 2013 now 2012-11-09 13:39:51 +01:00
smpp34_params.h initial import of libsmpp34-1.10 2012-11-07 08:32:31 +01:00
smpp34_structs.c misc: Always include stdint.h as it is almost 2013 now 2012-11-09 13:39:51 +01:00
smpp34_structs.h Fix Out of bounds compilation warning in OCTET8 2017-09-15 20:24:25 +02:00
smpp34_unpack.c Fix Out of bounds compilation warning in OCTET8 2017-09-15 20:24:25 +02:00