diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2012-07-17 13:01:17 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2012-07-17 13:01:17 +0000 |
commit | a8016f6a57056e5af2304d8216b97841f945bef7 (patch) | |
tree | 9c1b3d32213a0de0b09638031039ddd25cfca96d | |
parent | db3f6fe80c0999081f2ac55eac989fcda2c43a2a (diff) | |
download | wireshark-a8016f6a57056e5af2304d8216b97841f945bef7.tar.gz |
Fix bug #7488: Unable to correctly identify IEC 61850 MMS packets
In r39066 was added 'final check to see if the next SPDU, if present, is also valid',
but it didn't properly check for tvb length which causes exception if there's no next SPDU.
svn path=/trunk/; revision=43763
-rw-r--r-- | epan/dissectors/packet-ses.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ses.c b/epan/dissectors/packet-ses.c index 3cb3a01be9..0086276e96 100644 --- a/epan/dissectors/packet-ses.c +++ b/epan/dissectors/packet-ses.c @@ -1997,7 +1997,7 @@ dissect_ses_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) return FALSE; /* no */ /* final check to see if the next SPDU, if present, is also valid */ - if (tvb_length(tvb) > len) { + if (tvb_length(tvb) > 1+(guint) len) { type = tvb_get_guint8(tvb, offset + len + 1); /* check SPDU type */ if (match_strval(type, ses_vals) == NULL) { |