From 7e534da0158d1d4ebe27285d8c9e2f49502ece74 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B8rn=20Mork?= Date: Wed, 8 Apr 2015 15:31:18 +0200 Subject: [PATCH] fix subscriber response segfault MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Bjørn Mork --- 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.25.1