The check for max length of PDU elements reports "to long", when element is at
valid max length.
The check was
if (octstr_len(p->name) >= max_octets) { \
warning(0, "SMPP: PDU element <%s> too long " \
I guess this should be
if (octstr_len(p->name) > max_octets) { \
warning(0, "SMPP: PDU element <%s> too long " \
Arne
--
--------------------------------
Arne K. Haaje | www.drx.no
T: 69 51 15 52 | M: 92 88 44 66
--------------------------------
--- smpp_pdu.c~ 2009-02-25 09:43:23.000000000 +0100
+++ smpp_pdu.c 2009-02-25 09:43:23.000000000 +0100
@@ -395,7 +395,7 @@
append_encoded_integer(os, p->name, octets);
#define NULTERMINATED(name, max_octets) \
if (p->name != NULL) { \
- if (octstr_len(p->name) >= max_octets) { \
+ if (octstr_len(p->name) > max_octets) { \
warning(0, "SMPP: PDU element <%s> too long " \
"(length is %ld, should be %d)", \
#name, octstr_len(p->name), max_octets-1); \