Use tvb_ensure_bytes_exist() in tvb_get_string() instead of throwing an

exception ourselves.  Fixes bug 130.

svn path=/trunk/; revision=14220
This commit is contained in:
Gerald Combs 2005-04-28 18:07:40 +00:00
parent 537fa72b22
commit 618b8887dc
1 changed files with 1 additions and 2 deletions

View File

@ -1713,8 +1713,7 @@ tvb_get_string(tvbuff_t *tvb, gint offset, gint length)
const guint8 *ptr;
guint8 *strbuf = NULL;
if (length < 0)
THROW(DissectorError);
tvb_ensure_bytes_exist(tvb, offset, length);
ptr = ensure_contiguous(tvb, offset, length);
strbuf = g_malloc(length + 1);