diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 1999-10-25 20:32:52 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 1999-10-25 20:32:52 +0000 |
commit | 349912eb567fdac0e959136fd51c3fe01f695e34 (patch) | |
tree | ca524a8c1794abc8348582acab5eb1bba0e9546a /packet-icq.c | |
parent | 16bee536b73d7f97838fb5ff17c4f06b265bbfa7 (diff) |
Ensure that "password" is '\0'-terminated.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@925 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-icq.c')
-rw-r--r-- | packet-icq.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packet-icq.c b/packet-icq.c index f92869cddf..cd3716227f 100644 --- a/packet-icq.c +++ b/packet-icq.c @@ -1,7 +1,7 @@ /* packet-icq.c * Routines for ICQ packet disassembly * - * $Id: packet-icq.c,v 1.2 1999/10/25 20:28:21 guy Exp $ + * $Id: packet-icq.c,v 1.3 1999/10/25 20:32:52 guy Exp $ * * Ethereal - Network traffic analyzer * By Johan Feyaerts @@ -707,8 +707,9 @@ icqv5_cmd_login(proto_tree* tree, passwdLen = pletohs(pd + CMD_LOGIN_PASSLEN); } if (left>=10+passwdLen) { - password = g_malloc(passwdLen); + password = g_malloc(passwdLen + 1); strncpy(password, pd + CMD_LOGIN_PASSWD, passwdLen); + password[passwdLen] = '\0'; } if (left>=10+passwdLen+CMD_LOGIN_IP+4) { |