[OpenWrt-Devel] [PATCH uqmi] Fix improper length of sms message stored in User Data Length field

Sławomir Demeszko s.demeszko at wireless-instruments.com
Mon Dec 22 13:02:57 EST 2014


Signed-off-by: Sławomir Demeszko <s.demeszko at wireless-instruments.com>
---
 commands-wms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commands-wms.c b/commands-wms.c
index 1b4373f..798e012 100644
--- a/commands-wms.c
+++ b/commands-wms.c
@@ -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;
 }
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list