In code that checks whether to accept a packet, first check to make sure

the data being checked exists.

svn path=/trunk/; revision=12571
This commit is contained in:
Guy Harris 2004-11-22 01:58:21 +00:00
parent f833c77dff
commit 2f72f30630

View file

@ -538,6 +538,10 @@ dissect_smrse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
guint16 length;
int offset=0;
if (!tvb_bytes_exist(tvb, 0, 4)) {
/* Not enough data to check the sanity of the header. */
return 0;
}
reserved=tvb_get_guint8(tvb, 0);
length=tvb_get_ntohs(tvb,1);
tag=tvb_get_guint8(tvb, 3);