Fix improper length of sms message stored in User Data Length field
authorSławomir Demeszko <s.demeszko@wireless-instruments.com>
Mon, 22 Dec 2014 18:02:57 +0000 (19:02 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 22 Dec 2014 20:42:42 +0000 (21:42 +0100)
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
commands-wms.c

index c5be0f087b585128a55ed52cd981f12d84626e5a..2e4e08ff3ec0705286efd0f5deb4441ad67afea1 100644 (file)
@@ -591,7 +591,7 @@ pdu_encode_data(unsigned char *dest, const char *str)
 
        dest[len++] = 0;
        len += pdu_encode_7bit_str(&dest[len], str);
-       dest[0] = len - 1;
+       dest[0] = strlen(str);
 
        return len;
 }