aboutsummaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2005-07-26 15:28:39 +0000
committerGerald Combs <gerald@wireshark.org>2005-07-26 15:28:39 +0000
commit4ba7a9a429d811302bd9de0093b7a7f7f3fbfbc8 (patch)
tree2283890f235263d03fcbc03b18ba63ec551f88bc /print.c
parent9ed0d80bfccbf55437692c3f9385a879f25330af (diff)
In print_hex_data(), bail out early if our length is zero.
svn path=/trunk/; revision=15088
Diffstat (limited to 'print.c')
-rw-r--r--print.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/print.c b/print.c
index bef3745ab1..63adb1f9c6 100644
--- a/print.c
+++ b/print.c
@@ -679,6 +679,8 @@ print_hex_data(print_stream_t *stream, epan_dissect_t *edt)
g_free(line);
}
length = tvb_length(tvb);
+ if (length == 0)
+ return TRUE;
cp = tvb_get_ptr(tvb, 0, length);
if (!print_hex_data_buffer(stream, cp, length,
edt->pi.fd->flags.encoding))