diff options
author | Anders Broman <anders.broman@ericsson.com> | 2013-09-15 16:47:31 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2013-09-15 16:47:31 +0000 |
commit | 516f145eaa9c95ae5fa83f25201e3924d706c245 (patch) | |
tree | 80c25dea5a07fc7d7f7b2f3fd5a9e086c010e614 | |
parent | 78508839049dfc7163096b13db9e89f9091708f6 (diff) | |
download | wireshark-516f145eaa9c95ae5fa83f25201e3924d706c245.tar.gz |
Use "cheaper" length check.
svn path=/trunk/; revision=52064
-rw-r--r-- | epan/dissectors/packet-ar_drone.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-dplay.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ar_drone.c b/epan/dissectors/packet-ar_drone.c index db361615ae..13492b2133 100644 --- a/epan/dissectors/packet-ar_drone.c +++ b/epan/dissectors/packet-ar_drone.c @@ -125,7 +125,7 @@ dissect_ar_drone(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data proto_tree *ar_tree, *sub_tree; char *command; - if (!tvb_bytes_exist(tvb, 0, 3)) + if (tvb_length(tvb) < 4) return 0; /* Make sure the packet we're dissecting is a ar_drone packet */ diff --git a/epan/dissectors/packet-dplay.c b/epan/dissectors/packet-dplay.c index f43ab28081..7ed52eeb1e 100644 --- a/epan/dissectors/packet-dplay.c +++ b/epan/dissectors/packet-dplay.c @@ -1156,7 +1156,7 @@ static gboolean heur_dissect_dplay(tvbuff_t *tvb, packet_info *pinfo, proto_tree guint8 signature[] = {'p','l','a','y'}; guint32 dplay_id, token; - if(!tvb_bytes_exist(tvb, 0, 24)) + if((tvb_length(tvb) < 25) return FALSE; dplay_id = tvb_get_letohl(tvb, 20); |