diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2014-07-29 14:35:43 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2014-07-31 18:43:05 +0200 |
commit | c7b5aee0e5209b5b723d6e23ef06a9aa48fb5fda (patch) | |
tree | f59cb4f304ca2effcdd4dcea964df67d445c24f0 | |
parent | dc00622c3d8b42e7b76cd4ae04aad23a43142a89 (diff) | |
download | libmbim-c7b5aee0e5209b5b723d6e23ef06a9aa48fb5fda.tar.gz |
libmbim-glib,proxy-helpers: increase number of cids before reallocating
Otherwise we'll go writing out of bounds.
-rw-r--r-- | src/libmbim-glib/mbim-proxy-helpers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmbim-glib/mbim-proxy-helpers.c b/src/libmbim-glib/mbim-proxy-helpers.c index 2769d56..fef46f6 100644 --- a/src/libmbim-glib/mbim-proxy-helpers.c +++ b/src/libmbim-glib/mbim-proxy-helpers.c @@ -141,7 +141,7 @@ _mbim_proxy_helper_service_subscribe_list_merge (MbimEventEntry **original, if (out_cid_idx == entry->cids_count) { /* cid not found in merge array, add it */ - entry->cids = g_realloc (entry->cids, sizeof (guint32) * (entry->cids_count++)); + entry->cids = g_realloc (entry->cids, sizeof (guint32) * (++entry->cids_count)); entry->cids[out_cid_idx] = merge[i]->cids[ii]; } } |