diff options
author | Diederik de Groot <ddegroot@talon.nl> | 2015-12-08 17:59:12 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-12-09 12:40:44 +0000 |
commit | 9a59cd82433ae395971131743cae6d1eb0161cc9 (patch) | |
tree | 04023d8bc9ab6554f4ce5c70a57341b843221e8f /epan | |
parent | 31a54708f42fd5cdbe03c6872c4ff137008fb477 (diff) |
Skinny: packet-skinny
Fix messages generated by 894X phones, which do not always include all fields
Revert accidental change by using of an older packet-skinny.c.in file
Change-Id: I4c6f0ef053579cbbd0c15e90b44dda6a6b173d0d
Reviewed-on: https://code.wireshark.org/review/12478
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-skinny.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/epan/dissectors/packet-skinny.c b/epan/dissectors/packet-skinny.c index c5300b13de..fda0222fef 100644 --- a/epan/dissectors/packet-skinny.c +++ b/epan/dissectors/packet-skinny.c @@ -2400,7 +2400,7 @@ handle_RegisterMessage(ptvcursor_t *cursor, packet_info * pinfo _U_) ptvcursor_add(cursor, hf_skinny_ipV6AddressScope, 4, ENC_LITTLE_ENDIAN); ptvcursor_add(cursor, hf_skinny_firmwareLoadName, 32, ENC_ASCII|ENC_NA); } - if (hdr_data_length > 190) { + if (hdr_data_length > 191) { ptvcursor_add(cursor, hf_skinny_configVersionStamp, 48, ENC_ASCII|ENC_NA); } } @@ -2798,7 +2798,11 @@ handle_SoftKeyEventMessage(ptvcursor_t *cursor, packet_info * pinfo _U_) static void handle_UnregisterMessage(ptvcursor_t *cursor, packet_info * pinfo _U_) { - ptvcursor_add(cursor, hf_skinny_unRegReasonCode, 4, ENC_LITTLE_ENDIAN); + guint32 hdr_data_length = tvb_get_letohl(ptvcursor_tvbuff(cursor), 0); + + if (hdr_data_length > 12) { + ptvcursor_add(cursor, hf_skinny_unRegReasonCode, 4, ENC_LITTLE_ENDIAN); + } } /* @@ -3303,8 +3307,12 @@ handle_ServiceURLStatReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_) static void handle_FeatureStatReqMessage(ptvcursor_t *cursor, packet_info * pinfo _U_) { + guint32 hdr_data_length = tvb_get_letohl(ptvcursor_tvbuff(cursor), 0); + ptvcursor_add(cursor, hf_skinny_featureIndex, 4, ENC_LITTLE_ENDIAN); - ptvcursor_add(cursor, hf_skinny_featureCapabilities, 4, ENC_LITTLE_ENDIAN); + if (hdr_data_length > 16) { + ptvcursor_add(cursor, hf_skinny_featureCapabilities, 4, ENC_LITTLE_ENDIAN); + } } /* |