diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-07-29 21:30:32 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-07-29 21:30:32 +0000 |
commit | cf51d8d4c66e79d4beac0d62171c602eac23817c (patch) | |
tree | ccd7e66591b752ee06834214f23c326bd20154a8 /packet-wsp.c | |
parent | 98450e967dd8de08aba60296ec67546eb8d7a522 (diff) | |
download | wireshark-cf51d8d4c66e79d4beac0d62171c602eac23817c.tar.gz wireshark-cf51d8d4c66e79d4beac0d62171c602eac23817c.tar.bz2 wireshark-cf51d8d4c66e79d4beac0d62171c602eac23817c.zip |
As suggested by Georg von Zezschwitz, check whether all the bytes of the
URI are present before processing it, to catch bogus length values.
svn path=/trunk/; revision=8099
Diffstat (limited to 'packet-wsp.c')
-rw-r--r-- | packet-wsp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packet-wsp.c b/packet-wsp.c index a54a6efa16..7e215bb709 100644 --- a/packet-wsp.c +++ b/packet-wsp.c @@ -2,7 +2,7 @@ * * Routines to dissect WSP component of WAP traffic. * - * $Id: packet-wsp.c,v 1.72 2003/07/25 04:11:49 gram Exp $ + * $Id: packet-wsp.c,v 1.73 2003/07/29 21:30:32 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1614,6 +1614,7 @@ add_uri (proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint URILenOffset if (tree) ti = proto_tree_add_uint (tree, hf_wsp_header_uri_len,tvb,URILenOffset,count,uriLen); + tvb_ensure_bytes_exist(tvb, URIOffset, uriLen); if (tree) ti = proto_tree_add_item (tree, hf_wsp_header_uri,tvb,URIOffset,uriLen,bo_little_endian); if (check_col(pinfo->cinfo, COL_INFO)) { |