diff options
author | Anders Broman <anders.broman@ericsson.com> | 2009-10-25 11:43:30 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2009-10-25 11:43:30 +0000 |
commit | 88bb44a51e350c9749323242482dc5e944697d8f (patch) | |
tree | a19835aec094d07536c6def639d5d5d236f0a1cd /epan/dissectors/packet-ftp.c | |
parent | 337896f4c6777bc0b84a2e017ebcbb52100a312b (diff) |
From Jakub Zawadzki:
Cleanup dissector code - use proper memory functions.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4164
svn path=/trunk/; revision=30691
Diffstat (limited to 'epan/dissectors/packet-ftp.c')
-rw-r--r-- | epan/dissectors/packet-ftp.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/epan/dissectors/packet-ftp.c b/epan/dissectors/packet-ftp.c index 5e123f8d98..76e1c2248b 100644 --- a/epan/dissectors/packet-ftp.c +++ b/epan/dissectors/packet-ftp.c @@ -193,9 +193,7 @@ parse_port_pasv(const guchar *line, int linelen, guint32 *ftp_ip, /* * Copy the rest of the line into a null-terminated buffer. */ - args = ep_alloc(linelen + 1); - memcpy(args, line, linelen); - args[linelen] = '\0'; + args = ep_strndup(line, linelen); p = args; for (;;) { @@ -253,9 +251,7 @@ parse_extended_pasv_response(const guchar *line, int linelen, guint16 *ftp_port) /* * Copy the rest of the line into a null-terminated buffer. */ - args = ep_alloc(linelen + 1); - memcpy(args, line, linelen); - args[linelen] = '\0'; + args = ep_strndup(line, linelen); p = args; /* |