summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-dvbci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dissectors/packet-dvbci.c b/epan/dissectors/packet-dvbci.c
index 032d6049b6..6c38870f8c 100644
--- a/epan/dissectors/packet-dvbci.c
+++ b/epan/dissectors/packet-dvbci.c
@@ -2180,7 +2180,7 @@ pref_key_string_to_bin(const gchar *key_string, unsigned char **key_bin)
{
int key_string_len;
int i, j;
- char input[2];
+ char input[3];
if (!key_string || !key_bin)
return -1;
@@ -2188,6 +2188,7 @@ pref_key_string_to_bin(const gchar *key_string, unsigned char **key_bin)
if (key_string_len != 2*AES_KEY_LEN)
return -1;
*key_bin = (unsigned char*)g_malloc(key_string_len/2);
+ input[2] = '\0';
j=0;
for (i=0; i<key_string_len-1; i+=2) {