forked from osmocom/wireshark
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:
parent
537fa72b22
commit
618b8887dc
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue