In print_hex_data(), bail out early if our length is zero.

svn path=/trunk/; revision=15088
This commit is contained in:
Gerald Combs 2005-07-26 15:28:39 +00:00
parent 9ed0d80bfc
commit 4ba7a9a429
1 changed files with 2 additions and 0 deletions

View File

@ -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))