aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2009-08-06 23:51:45 +0000
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2009-08-06 23:51:45 +0000
commit4ec31fe7d8cb331d652bd2c6713b2806a5fc6f7d (patch)
treeb1758cee940873958b029ac3b850dbd31b7eea23 /epan/dissectors
parentd860c86eca5febe13bf11da87c7359c373b9a7cd (diff)
Fix some individual cases of 'if (unsigned) < 0'
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29320 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-gsm_a_dtap.c12
-rw-r--r--epan/dissectors/packet-gsm_a_rp.c2
-rw-r--r--epan/dissectors/packet-gsm_a_rr.c4
-rw-r--r--epan/dissectors/packet-gsm_bssmap_le.c2
4 files changed, 10 insertions, 10 deletions
diff --git a/epan/dissectors/packet-gsm_a_dtap.c b/epan/dissectors/packet-gsm_a_dtap.c
index bbed499afd..98055b9a0e 100644
--- a/epan/dissectors/packet-gsm_a_dtap.c
+++ b/epan/dissectors/packet-gsm_a_dtap.c
@@ -3800,7 +3800,7 @@ dtap_mm_auth_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
curr_offset++;
curr_len--;
- if (curr_len <= 0) return;
+ if ((signed)curr_len <= 0) return;
ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND);
@@ -3910,7 +3910,7 @@ dtap_mm_cm_reestab_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint le
curr_offset++;
curr_len--;
- if (curr_len <= 0) return;
+ if ((signed)curr_len <= 0) return;
ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL);
@@ -4065,7 +4065,7 @@ dtap_mm_cm_srvc_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
curr_offset++;
curr_len--;
- if (curr_len <= 0) return;
+ if ((signed)curr_len <= 0) return;
ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL);
@@ -4320,7 +4320,7 @@ dtap_mm_loc_upd_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
curr_offset++;
curr_len--;
- if (curr_len <= 0) return;
+ if ((signed)curr_len <= 0) return;
ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_LAI);
@@ -4559,7 +4559,7 @@ dtap_cc_congestion_control(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guin
curr_offset++;
curr_len--;
- if (curr_len <= 0) return;
+ if ((signed)curr_len <= 0) return;
ELEM_OPT_TLV(0x08, GSM_A_PDU_TYPE_DTAP, DE_CAUSE, NULL);
@@ -5839,7 +5839,7 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (msg_str == NULL) return;
- if ((len - offset) <= 0) return;
+ if (offset >= len) return;
/*
* decode elements
diff --git a/epan/dissectors/packet-gsm_a_rp.c b/epan/dissectors/packet-gsm_a_rp.c
index 9432f486a4..208a2beba0 100644
--- a/epan/dissectors/packet-gsm_a_rp.c
+++ b/epan/dissectors/packet-gsm_a_rp.c
@@ -515,7 +515,7 @@ dissect_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (str == NULL) return;
- if ((len - offset) <= 0) return;
+ if (offset >=len) return;
/*
* decode elements
diff --git a/epan/dissectors/packet-gsm_a_rr.c b/epan/dissectors/packet-gsm_a_rr.c
index ef2de9b48b..c0a0fd1fa4 100644
--- a/epan/dissectors/packet-gsm_a_rr.c
+++ b/epan/dissectors/packet-gsm_a_rr.c
@@ -7522,7 +7522,7 @@ dtap_rr_paging_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
curr_offset++;
curr_len--;
- if (curr_len <= 0) return;
+ if ((signed)curr_len <= 0) return;
ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL);
@@ -8611,7 +8611,7 @@ dissect_ccch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (msg_str == NULL)
return;
- if ((len - offset) <= 0)
+ if (offset >= len)
return;
/*
diff --git a/epan/dissectors/packet-gsm_bssmap_le.c b/epan/dissectors/packet-gsm_bssmap_le.c
index 49c04581d7..ee0ab37d73 100644
--- a/epan/dissectors/packet-gsm_bssmap_le.c
+++ b/epan/dissectors/packet-gsm_bssmap_le.c
@@ -948,7 +948,7 @@ dissect_bssmap_le(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (str == NULL) return;
- if ((len - offset) <= 0) return;
+ if (offset >= len) return;
/*
* decode elements