aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-ftp.c')
-rw-r--r--epan/dissectors/packet-ftp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ftp.c b/epan/dissectors/packet-ftp.c
index 6a4fa27b3b..2bdf5bdbe8 100644
--- a/epan/dissectors/packet-ftp.c
+++ b/epan/dissectors/packet-ftp.c
@@ -327,6 +327,8 @@ parse_eprt_request(const guchar* line, gint linelen, guint32 *eprt_af,
/* Copy the rest of the line into a null-terminated buffer. */
args = wmem_strndup(wmem_packet_scope(), line, linelen);
p = args;
+ if ((gint)strlen(args) < linelen)
+ linelen = (gint)strlen(args);
/*
* RFC2428 sect. 2 states ...