aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ua3g.c
AgeCommit message (Collapse)AuthorFilesLines
2017-03-19Fix: UA3G read past end of tvb + NOE key descriptionserikdejong1-1/+1
packet-ua3g.c: Start tone device routing packet causes exception because it adds a subtree with length 6 where it should be 3. Changed 6 to 3. packet-noe.c: Key description is incomplete because buffer reserved is only 10 bytes long and key descriptions are up to 23 bytes long. Changed buffer length to 24. Bug: 13502 Change-Id: I8212d23c650efd341e87f766a80a887ef82f4b0b Reviewed-on: https://code.wireshark.org/review/20633 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>
2017-03-05dissectors: fix this statement may fall through ↵Alexis La Goutte1-1/+1
[-Werror=implicit-fallthrough=] found by gcc7 Change-Id: Iba6238988ded675cba328ab512232d1919d93b4a Reviewed-on: https://code.wireshark.org/review/20415 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-13Adjust proto_tree_add_uint_format_value calls to use unit stringMichael Mann1-1/+1
Several calls to proto_tree_add_uint_format_value could be better served using BASE_UNIT_STRING with a "unit string" in hf_ field. There also a few cases where proto_tree_add_uint_format_value could just be proto_tree_add_uint. Added a few more "common" unit string values to unit_strings.[ch] Change-Id: Iaedff82c515269c9c31ab9100dff19f5563c932d Reviewed-on: https://code.wireshark.org/review/19242 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-21Add proto_tree_add_checksum.Michael Mann1-1/+1
This is an attempt to standardize display/handling of checksum fields for all dissectors. The main target is for dissectors that do validation, but dissectors that just report the checksum were also included just to make them easier to find in the future. Bug: 10620 Bug: 12058 Ping-Bug: 8859 Change-Id: Ia8abd86e42eaf8ed50de6b173409e914b17993bf Reviewed-on: https://code.wireshark.org/review/16380 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-08Fix a lot of typos and misspellingsmoshekaplan1-1/+1
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3 Reviewed-on: https://code.wireshark.org/review/13069 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>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-24Eliminate proto_tree_add_text from some dissectorsMichael Mann1-91/+103
Change-Id: Id710ab10093227b27ef5f18b0d2960e31d0b95a9 Reviewed-on: https://code.wireshark.org/review/10200 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-22Remove a bunch of deprecated tvb_length callsEvan Huus1-1/+1
Change-Id: I9362e0fdc4519ba5f3d656152966e7030f478839 Reviewed-on: https://code.wireshark.org/review/9022 Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2015-02-18Add a CF_FUNC macro for casting BASE_CUSTOM functions.Gerald Combs1-7/+7
Add a CF_FUNC macro to match VALS, TFS, etc. This should help us to avoid the following warning: warning: ISO C forbids initialization between function pointer and 'void *' [-Wpedantic] We could start adding DIAG_OFF+DIAG_ON everywhere but this seems to be more consistent with the other macros in proto.h. Update each instance of BASE_CUSTOM to use CF_FUNC. Adjust a dummy variable name generated by asn2wrs.py that was triggering an invalid error in checkhf.pl. Fix an encoding arguement in packet-elasticsearch.c found by fix-encoding-args.pl. Change-Id: Id0e75076c2d71736639d486f47b87bab84e07d22 Reviewed-on: https://code.wireshark.org/review/7150 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-3/+0
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-13Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...Bill Meier1-169/+169
(for some dissectors which fetch all other integral fields using ENC_BIG_ENDIAN). Change-Id: Ic18e3172aad76af12b12d6732c88497be22aed56 Reviewed-on: https://code.wireshark.org/review/5748 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-20Get rid of unnecessary includes of ctype.h.Guy Harris1-2/+0
Change-Id: I2cf49f808558147ce77e7d086558966cfb2defca Reviewed-on: https://code.wireshark.org/review/4850 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-09-30Add editor modelines; Adjust whitespace as needed.Bill Meier1-3/+16
Change-Id: I434da226c842298f4fb2a4335d06d51e164af2af Reviewed-on: https://code.wireshark.org/review/4394 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-07convert to proto_tree_add_subtree[_format]Michael Mann1-30/+17
Change-Id: Ie10ac4f5f04a23344d183e095bbafb23c6409144 Reviewed-on: https://code.wireshark.org/review/2904 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-1/+1
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-1/+1
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-03Fix all -fstrict-alias warnings found by gcc 4.1.2Gilbert Ramirez1-3/+3
The majority of the fixes are for calls to uat_new(). Instead of having each caller cast its private data to (void**), we use void* in the uat_new() API itself. Inside uat_new(), we cast the void* to void**. Some dissectors use val64_string arrays, so a VALS64() macro was added for those, to avoid using VALS(), which is useful only for value_string arrays. packet-mq.c was changed because dissect_nt_sid() requires a char**, not a guint**. All other callers of dissect_nt_sid() use char*'s (and take the address of it) for their local storage. So, this was changed to follow the other practices. A confusion between gint and absolute_time_display_e in packet-time.c was cleared up. The ugliest fix is the addition of ip6_guint8_to_str(), for exactly one caller. The caller uses one type of ip6 address byte array, while ip6_to_str() expects another. This new function is in place until the various address implementations can be consolidated. Add VALS64() to the developer documentation. Change-Id: If93ff5c6c8c7cc3c9510d7fb78fa9108e4552805 Reviewed-on: https://code.wireshark.org/review/48 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2013-12-10- Forward declaration of register functions.Anders Broman1-1/+2
svn path=/trunk/; revision=53911
2013-12-09From packet-ua, pass a pointer to direction rather than direction itself. ↵Chris Maynard1-4/+9
In packet-ua3g, reject the packet if data is NULL. svn path=/trunk/; revision=53887
2013-10-29From didier gautheron: remove redundant or use faster col_xxx functionsBill Meier1-2/+2
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster. - same for replace col_append_fstr and col_append_str - remove col_clear() when it's redundant: + before a col_set/col_add if the dissector can't throw an exception. - replace col_append() after a col_clear() with faster col_add... or col_set https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9344 svn path=/trunk/; revision=52948
2013-10-23#if 0 numerous "unused const variables" (mostly value-string-arrays);Bill Meier1-0/+4
Also; fix a few "set but not used" warnings. svn path=/trunk/; revision=52780
2013-09-15emem -> wmem (except uat or init routines)Pascal Quantin1-18/+18
svn path=/trunk/; revision=52087
2013-09-15Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if ↵Michael Mann1-2/+2
hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly. The script didn't catch as many as I would have liked, but it's a start. The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum. svn path=/trunk/; revision=52045
2013-09-02Fix warning found by fix-encoding-args toolsAlexis La Goutte1-2/+2
svn path=/trunk/; revision=51685
2013-09-02Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-2/+2
svn path=/trunk/; revision=51677
2013-08-05Replace global variable that was just used to pass data between dissectors ↵Michael Mann1-5/+6
with call_dissector_with_data. svn path=/trunk/; revision=51157
2013-08-05Get rid of some unused and set-but-unused variables.Jeff Morriss1-23/+17
Un-shadow a variable. Ensure a (new) tree variable is initialized. Clean up trailing white space. svn path=/trunk/; revision=51150
2013-08-05Massive conversion to filterable items. It started with ↵Michael Mann1-2199/+1524
convert_proto_tree_add_text.pl, but continued as with many other cases that couldn't be handled by it (like using emem_strbuf_t to create groups of field strings). Should now pacify bug 6844 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6844) svn path=/trunk/; revision=51148
2013-07-31Some cleanup prepping for convert_proto_tree_add_text.pl. Major issue was ↵Michael Mann1-1098/+1175
making value_strings global for the file (and adjusting their "namespace"), so they can be used in the hf array. svn path=/trunk/; revision=51048
2013-06-14Remove check_col() and the occasional tree.Michael Mann1-50/+31
svn path=/trunk/; revision=49923
2013-04-01Typo's. That is all.Jaap Keuter1-6/+6
svn path=/trunk/; revision=48685
2013-03-28Fix Coverity CID's 281433 and 281434: Unintended sign extension. (18 instances)Chris Maynard1-20/+22
Fix Coverity CID 702381: Missing break in switch. Add an "XXX" note regarding the framing_rtp assignment, since something appears to be missing. #BACKPORT(1.8) svn path=/trunk/; revision=48620
2012-10-11Change 'for (i=1; i<=n;...' to 'for (i=0; i<n; ...)Bill Meier1-6/+9
The changes fix definite problems or are done "just in case" for cases not esily determined to be a problem by quick inspection. Note: in some cases for loop index variables have been renamed to ensure all required codes changes detected. ##backport svn path=/trunk/; revision=45477
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45017
2012-08-23Fix extended value-string linear search: Move out-of-order value-string ↵Bill Meier1-2/+2
array entry. svn path=/trunk/; revision=44635
2012-08-10Use val_to_str_const() where appropriate;Bill Meier1-1/+1
Also (for a few files): - create/use some extended value strings; - remove unneeded #include files; - remove unneeded variable initialization; - re-order fcns slightly so prefs_reg_handoff...() at end, etc svn path=/trunk/; revision=44438
2012-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2012-06-08Fix bug I introduced in SVN #43129.Bill Meier1-8/+13
Fixes fuzz crash reported in Bug #7346. svn path=/trunk/; revision=43164
2012-06-06Fix some bugs & do extensive cleanup;Bill Meier1-4545/+4698
Bugs fixed: - Calling col_...() fcns or dissectors under 'if (tree)' - Potential buffer overflows (if bad data) - Misc incorrect data display issues Cleanup including; - Remove unneeded #includes - Fix excessive use of value_strings - Use extended value_strings & val_to_str_(ext_)const as appropriate - Optimize repeated fetches of the same data from a tvb - Do general code simplification - Remove or #if 0 unused code; - Add XXX comments for code which may be incorrect - Remove unneeded prefs callback to proto_reg_handoff...() - Remove unneeded use of check_col() - Define several functions as static - Move proto_reg_handoff...() to the end of the file - Fix whitespace (including "4 space tabs") - ... svn path=/trunk/; revision=43129
2012-04-30Don't use tabs in string constants;Bill Meier1-7/+7
svn path=/trunk/; revision=42357
2012-04-03Fix a couple of CIDs related to missing breaks: both are intentional[1] so addJeff Morriss1-0/+2
comments to that effect. [1] Based on comment from Lars Roff via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6844 svn path=/trunk/; revision=41899
2012-03-18From Reinhard Speyerer: Fix several misspellings/typos in WiresharkBill Meier1-1/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6967 svn path=/trunk/; revision=41645
2012-03-18Fix the infinite-loop fuzz failure reported in ↵Jeff Morriss1-3/+3
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6962 : Repeat r41359 in another location: Don't try to display tone entries if there are none (but there is length for them). Could/should be an expert_info. Also fix a typo: Nomber->Number. svn path=/trunk/; revision=41639
2012-03-18Fix one of the dissector assertions in ↵Jeff Morriss1-3/+3
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6962 : Don't use a proto_item as the tree in proto_tree_add_text(). (There's code here to hang a subtree off the item but it's commented out.) svn path=/trunk/; revision=41638
2012-03-17Clean up from what appears to have been 4-space tabs.Jeff Morriss1-2479/+1106
Clean up indentation. Leave only one statement on each line. svn path=/trunk/; revision=41626
2012-03-17Fix the infinite-loop fuzz failure reported inJeff Morriss1-20/+20
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6949 : Don't use a guint8 for() loop index when the end of the loop value is stored in a guint: the loop index may never reach the end-of-loop value. Also remove a shadow'd variable. svn path=/trunk/; revision=41625
2012-03-05Fix the infinite-loop fuzz failure reported in ↵Jeff Morriss1-1/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6907 : Don't try to display tone entries if there are none (but there is length for them). Could/should be an expert_info. svn path=/trunk/; revision=41359
2012-03-01From Lars Ruoff:Anders Broman1-0/+6379
Dissector for Alcatel-Lucent Enterprise Universal Alcatel- and NOE protocol, take II. families. Meant as a replacement for existing UA-dissector in trunk because of better feature set: - latest protocol specifiaction - more detailed dissection and filtering possibilities on subprotocols - RTP stream setup - NOE over SIP Lars Ruoff On behalf of Alcatel-Lucent Enterprise https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6844 svn path=/trunk/; revision=41266
2012-02-22Reverse Revision 41134 (Need to fix error/warning before...)Alexis La Goutte1-6379/+0
svn path=/trunk/; revision=41135