summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2014-06-23 22:06:05 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2014-06-23 20:13:28 +0000
commitc7874f7d8c046beaa75a45f14b991a1adf62f31d (patch)
treef0e40f41743dc4d835b3630ec1f65a8a02909e54
parentd24be5b86e3771eec6071f536758c9fa0ab8453d (diff)
downloadwireshark-c7874f7d8c046beaa75a45f14b991a1adf62f31d.tar.gz
Initialize whole buffer in GPRS Mobility and Session Management dissector
Bug: 10216 Change-Id: I572a7a6ce0f816063f02397b667dd46c990cf73e Reviewed-on: https://code.wireshark.org/review/2583 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> (cherry picked from commit dd7134d907350ccc574cdec596f4162860912bb9) Reviewed-on: https://code.wireshark.org/review/2584
-rw-r--r--epan/dissectors/packet-gsm_a_gm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-gsm_a_gm.c b/epan/dissectors/packet-gsm_a_gm.c
index 9e4050a9fd..eeaea7707c 100644
--- a/epan/dissectors/packet-gsm_a_gm.c
+++ b/epan/dissectors/packet-gsm_a_gm.c
@@ -3862,7 +3862,7 @@ de_sm_apn(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g
curr_offset = offset;
/* init buffer and copy it */
- memset(str, 0, MAX_APN_LENGTH);
+ memset(str, 0, MAX_APN_LENGTH+1);
tvb_memcpy(tvb, str, offset, len<MAX_APN_LENGTH?len:MAX_APN_LENGTH);
curr_len = 0;