aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gsm_a_common.h
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2014-03-29 11:01:06 -0400
committerEvan Huus <eapache@gmail.com>2014-03-29 16:04:50 +0000
commitadc46f571c0357f7600c5cc49c21a8e1403a2af0 (patch)
treea3c36441eefeeed92a9ebb6a6afee800e02a1513 /epan/dissectors/packet-gsm_a_common.h
parent302632f4b3dba9fd4287795347598ad767eca8ee (diff)
Tighten the NO_MORE_DATA_CHECK macros
We should return if we've already somehow overflowed the apparent length, not just if we've hit it dead on. Fixes bug #9932 and probably others. Change-Id: I2719c3bd38f03e18ea557df962ee4a1beb64c2e8 Reviewed-on: https://code.wireshark.org/review/862 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-gsm_a_common.h')
-rw-r--r--epan/dissectors/packet-gsm_a_common.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-gsm_a_common.h b/epan/dissectors/packet-gsm_a_common.h
index 675877c7e8..7f5db63db4 100644
--- a/epan/dissectors/packet-gsm_a_common.h
+++ b/epan/dissectors/packet-gsm_a_common.h
@@ -247,7 +247,7 @@ extern const char* get_gsm_a_msg_string(int pdu_type, int idx);
}
#define NO_MORE_DATA_CHECK(nmdc_len) \
- if ((nmdc_len) == (curr_offset - offset)) return(nmdc_len);
+ if ((nmdc_len) <= (curr_offset - offset)) return(nmdc_len);
#define SET_ELEM_VARS(SEV_pdu_type, SEV_elem_names_ext, SEV_elem_ett, SEV_elem_funcs) \
switch (SEV_pdu_type) \