]> The Tcpdump Group git mirrors - tcpdump/commitdiff
If we don't find a CR-LF or LF, print up to the end of the packet.
authorGuy Harris <[email protected]>
Sun, 19 Oct 2014 20:48:04 +0000 (13:48 -0700)
committerGuy Harris <[email protected]>
Sun, 19 Oct 2014 20:48:04 +0000 (13:48 -0700)
util.c

diff --git a/util.c b/util.c
index 6a827dce71405a7618976e9a0dd9e509aa866ffd..5569021c242ca7d9155f4bcdb68a19353cc6ea9b 100644 (file)
--- a/util.c
+++ b/util.c
@@ -633,6 +633,7 @@ print_txt_line(netdissect_options *ndo, const char *protoname,
         * in the buffer; treat this as if it were truncated.
         */
 trunc:
+       linelen = idx - startidx;
        ND_PRINT((ndo, "%s%.*s[!%s]", prefix, (int)linelen, pptr + startidx,
            protoname));
        return (0);