diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-04-28 18:07:40 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-04-28 18:07:40 +0000 |
commit | ffa647b43b5d525727be2db8f7acc3f68e4ef538 (patch) | |
tree | f35cd16698906dcb2a170e6d1041f463c654a673 /epan/tvbuff.c | |
parent | 2bc58d863689d25488803d1c11b375b4de463fd7 (diff) |
Use tvb_ensure_bytes_exist() in tvb_get_string() instead of throwing an
exception ourselves. Fixes bug 130.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14220 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/tvbuff.c')
-rw-r--r-- | epan/tvbuff.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c index c184d9ba9e..aff4825cad 100644 --- a/epan/tvbuff.c +++ b/epan/tvbuff.c @@ -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); |