aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ipsec.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2008-05-09 16:30:05 +0000
committerGuy Harris <guy@alum.mit.edu>2008-05-09 16:30:05 +0000
commit4567d72fdc00a3424a3db03b8ff66ccb700133e1 (patch)
tree5cbf668c2ce1996d4f56a5ec8800ef92728dc447 /epan/dissectors/packet-ipsec.c
parent69efaa363db8a5ff7bb5a52be9ac789473b26177 (diff)
Null-terminate the hex-to-text-converted string.
svn path=/trunk/; revision=25266
Diffstat (limited to 'epan/dissectors/packet-ipsec.c')
-rw-r--r--epan/dissectors/packet-ipsec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ipsec.c b/epan/dissectors/packet-ipsec.c
index 7249953120..b8f2968321 100644
--- a/epan/dissectors/packet-ipsec.c
+++ b/epan/dissectors/packet-ipsec.c
@@ -1184,6 +1184,7 @@ compute_ascii_key(gchar **ascii_key, gchar *key)
key_byte |= (guchar)hex_digit;
(*ascii_key)[j] = key_byte;
}
+ (*ascii_key)[j] = '\0';
}
else
@@ -1225,6 +1226,7 @@ compute_ascii_key(gchar **ascii_key, gchar *key)
key_byte |= (guchar)hex_digit;
(*ascii_key)[j] = key_byte;
}
+ (*ascii_key)[j] = '\0';
}
}