[OpenWrt-Devel] [PATCH 1/3] fix subscriber response segfault
Bjørn Mork
bjorn at mork.no
Tue Apr 7 09:22:22 EDT 2015
Signed-off-by: Bjørn Mork <bjorn at mork.no>
---
cli.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cli.c b/cli.c
index e6b34d7..cb107b7 100644
--- a/cli.c
+++ b/cli.c
@@ -152,7 +152,7 @@ mbim_subscriber_response(void *buffer, int len)
if (le32toh(state->readyinfo) & MBIM_READY_INFO_FLAG_PROTECT_UNIQUE_ID)
printf(" dont display subscriberID: 1\n");
for (nr = 0; nr < le32toh(state->telephonenumberscount); nr++) {
- struct mbim_string *str = buffer + le32toh(state->telephonenumbers) + (nr * sizeof(struct mbim_string));
+ struct mbim_string *str = (void *)&state->telephonenumbers + (nr * sizeof(struct mbim_string));
char *number = mbim_get_string(str, buffer);
printf(" number: %s\n", number);
}
--
2.1.4
_______________________________________________
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