diff options
author | Evan Huus <eapache@gmail.com> | 2014-05-25 11:13:04 -0400 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-05-25 18:12:00 +0000 |
commit | 08ce84ebbe91eaaccd8bbf8c8d43c8cecfc7945a (patch) | |
tree | 1ee03c6b55a52e996fbf1ec25befe127cb071385 /asn1 | |
parent | c4ead251da7199cfd746d378c51eb8c30d09a6ba (diff) |
Grab-bag of dead initializers and two actual bugs.
All caught by cppcheck. The two (semi)-interesting bugs are:
- in asn1/atn-cpdlc/packet-atn-cpdlc-template.c where the break statement should
have been inside the brace, causing potential control-flow weirdness with
exceptions
- in epan/dissectors/packet-ieee80211.c where the bounds check for tag_len did
not match the expert info given
Change-Id: Ie173fb8d917aabb9b4571435d671d6f16e1c7569
Reviewed-on: https://code.wireshark.org/review/1793
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/atn-cm/packet-atn-cm-template.c | 6 | ||||
-rw-r--r-- | asn1/atn-cpdlc/packet-atn-cpdlc-template.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/asn1/atn-cm/packet-atn-cm-template.c b/asn1/atn-cm/packet-atn-cm-template.c index c2bc0da5b6..a666293c2f 100644 --- a/asn1/atn-cm/packet-atn-cm-template.c +++ b/asn1/atn-cm/packet-atn-cm-template.c @@ -74,9 +74,9 @@ dissect_atn_cm( proto_tree *tree, void *data _U_) { - int type = no_msg; - proto_item *ti = NULL; - proto_tree *sub_tree = NULL; + int type; + proto_item *ti; + proto_tree *sub_tree; ti = proto_tree_add_text( tree, diff --git a/asn1/atn-cpdlc/packet-atn-cpdlc-template.c b/asn1/atn-cpdlc/packet-atn-cpdlc-template.c index 66f0a83c3b..b0ba23c4d9 100644 --- a/asn1/atn-cpdlc/packet-atn-cpdlc-template.c +++ b/asn1/atn-cpdlc/packet-atn-cpdlc-template.c @@ -218,7 +218,7 @@ dissect_atn_cpdlc_heur( atn_conversation_t *atn_cv = NULL; volatile gboolean is_atn_cpdlc = FALSE; volatile gboolean is_pm = FALSE; - int type = no_msg; + int type; type = check_heur_msg_type(pinfo); @@ -227,8 +227,8 @@ dissect_atn_cpdlc_heur( TRY { dissect_ProtectedGroundPDUs_PDU(tvb, pinfo, NULL); is_atn_cpdlc = TRUE; - is_pm = TRUE;} - break; + is_pm = TRUE; + break;} CATCH_ALL{ is_atn_cpdlc = FALSE; is_pm = FALSE;} |