diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-03-16 13:39:55 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-03-16 13:39:55 +0000 |
commit | a01dfef2f74ff4d9a5410f5d57f2feab8a31e335 (patch) | |
tree | 7d9336081159064f52c05310798f0f49db8a64b4 /epan/dissectors/packet-manolito.c | |
parent | a777d5b1ad30bd6e23b7937fe5ad540a3c0c8724 (diff) |
close potential overflow causing malloc to allocate 0 bytes
svn path=/trunk/; revision=13766
Diffstat (limited to 'epan/dissectors/packet-manolito.c')
-rw-r--r-- | epan/dissectors/packet-manolito.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/epan/dissectors/packet-manolito.c b/epan/dissectors/packet-manolito.c index 1855b3cb26..1990c1f1a3 100644 --- a/epan/dissectors/packet-manolito.c +++ b/epan/dissectors/packet-manolito.c @@ -184,6 +184,7 @@ dissect_manolito(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) length = tvb_get_guint8(tvb, ++offset); /* get the payload */ + g_assert(length<0xff); /* to avoid guint8 overflow */ data = malloc(length + 1); tvb_memcpy(tvb, (guint8*)data, ++offset, length); offset += length; |