aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-assa_r3.c
AgeCommit message (Collapse)AuthorFilesLines
2013-06-04Fix the fuzz failure reported (by me) in ↵Jeff Morriss1-7/+14
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8764 : Apply the fix from bug 8539 (r48796) to another function (dissect_r3_upstreamcommand_queryconfig()): Bail out of the item length we get (which we use to increment the offset) is 0. Otherwise the offset does not advance and we loop forever. While we're in there: get the item length just once (there's no need to call tvb_get_guint8() a half dozen times when one will do). svn path=/trunk/; revision=49744
2013-04-09Fix the fuzz failure reported in ↵Jeff Morriss1-14/+14
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8539 : Bail out of the item length we get (which we use to increment the offset) is 0. Otherwise the offset does not advance and we loop forever. While we're in there: get the item length just once (there's no need to call tvb_get_guint8() a half dozen times when one will do). svn path=/trunk/; revision=48796
2013-03-29Rename value string (and similar) functions to use a consistent pattern. ThisEvan Huus1-1/+1
was done using textual search+replace, not anything syntax-aware, so presumably it got most comments as well (except where there were typos). Use a consistent coding style, and make proper use of the WS_DLL_* defines. Group the functions appropriately in the header. I ended up getting rid of most of the explanatory comments since many of them duplicated what was in the value_string.c file (and were out of sync with the recent updates I made to those in r48633). Presumably most of the comments should be in the .h file not the .c file, but there's enough churn ahead that it's not worth fixing yet. Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467 svn path=/trunk/; revision=48634
2013-03-19From beroset:Anders Broman1-1/+1
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48426
2013-03-13- [-Wmissing-prototypes]Anders Broman1-1/+4
- explicit casts. svn path=/trunk/; revision=48282
2013-02-26Fix spelling/typos found using a list of commonly misspelled words.Bill Meier1-1/+1
The misspellings were mostly in comments but some were in text strings visible to the user. svn path=/trunk/; revision=47899
2013-02-26it's ==> its & its ==> it's as needed.Bill Meier1-1/+1
svn path=/trunk/; revision=47891
2012-12-11Move ett and hf arrays into proto_register routine.Jeff Morriss1-3396/+3513
Reindent some. svn path=/trunk/; revision=46495
2012-12-06Fix inifite loop in the R3 dissector reported inJeff Morriss1-5/+13
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8040 : If the alarm length is 0, raise an expert_info and break out of the loop. svn path=/trunk/; revision=46415
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-07-14tvb_length_remaining() can return -1, so be sure to deal with it if it does. ↵Chris Maynard1-25/+26
Should fix a bunch of Coverity CID's. svn path=/trunk/; revision=43715
2012-07-11Fix [-Werror=sign-compare] compiler warningBill Meier1-2/+2
svn path=/trunk/; revision=43666
2012-07-11Simplify code ....Bill Meier1-111/+82
svn path=/trunk/; revision=43665
2012-07-11Remove "comment to myself".Bill Meier1-1/+1
svn path=/trunk/; revision=43664
2012-07-11General cleanup:Bill Meier1-1676/+4947
- Fix potential array overflow; - Calls to expert...() should not be under 'if (tree)'; - Don't use DISSECTOR_ASSERT for bad data; use expert...(); - Add some XXX comments about enum item values different than specified in the comments associated with the enum items; - Init global 'mfgCommandFlag' as appropriate before use; - Add missing hf[] entries; - #if 0 various unused #defines and enums; - Reduce (somewhat) repeated fetches of the same tvb data; - Remove unneeded initializers; - Don't use 'l' as a variable name; - Reformat long lines, hf[] array entries and other;; - Fix some indentation; svn path=/trunk/; revision=43663
2012-07-09From Evan Huus: Struct cleanup in packet-assa_r3.cBill Meier1-385/+342
Cleanup and simplify structures and arrays in packet-assa_r3.c as described in my email to the -dev list [1]. [1] http://www.wireshark.org/lists/wireshark-dev/201207/msg00050.html From me: Do the same as above for the commandDissectorParser_t struct mentioned in the EMail (but not fixed in the patch). svn path=/trunk/; revision=43623
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-05-16all:Bill Meier1-2/+957
Merge .h files into .c files since .h files unused elsewhere; Do whitespace, indentation & formatting cleanup. packet-acn.c: Fix 2 minor bugs wherein subtree not displayed in packet-details because tree variable used in proto_tree_add_text() always NULL. svn path=/trunk/; revision=42647
2012-05-07Get rid of remaining Booleans-as-encoding-arguments inGuy Harris1-17/+23
proto_tree_add_item() calls; for the items that don't actually have hf_ entries (which is a bug in the dissector!), assume the short fixed-length ones are integral and the "to the end of the packet" ones are byte arrays (hence ENC_NA). svn path=/trunk/; revision=42475
2012-04-18From Evan Huus: There were two cases where we could underflow an unsigned ↵Anders Broman1-6/+20
subtraction, leading to huge values and near-infinite loops. Catch them and add an expert_info warning that the packet is bad. Also fix some other expert_info messages to hang off of the right dissection tree. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7125 svn path=/trunk/; revision=42122
2012-03-06Fix benign issue: For FT_BOOLEAN fields with a zero bitmask, use BASE_NONE ↵Bill Meier1-5/+5
for 'display' svn path=/trunk/; revision=41385
2011-10-24Fix encoding arg for various fcn calls:Bill Meier1-56/+56
- proto_tree_add_bits_item - proto_tree_add_bits_ret_val - proto_tree_add_bitmask - tvb_get_bits - tvb_get_bits16 - tvb_get_bits24 - tvb_get_bits32 - tvb_get_bits64 svn path=/trunk/; revision=39539
2011-10-23Fix a proto_tree_add_item() encoding arg.Bill Meier1-1/+1
svn path=/trunk/; revision=39527
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-1/+1
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵Bill Meier1-6/+6
FT_STRINGZ, FT_UINT_STRING as follows: 1. If there's no character encoding (ENC_ASCII, ...) specified then use ENC_ASCII. 2. For all but FT_UINT_STRING, always use ENC_NA (replacing any existing True/1/FALSE/0 /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN). svn path=/trunk/; revision=39426
2011-10-10Comment out some unused hf[] entries;Bill Meier1-16/+18
Add notes about missing hf[] entries. svn path=/trunk/; revision=39344
2011-10-10Convert proto_tree_add_item() 'encoding' parameter as appropriate.Bill Meier1-42/+42
svn path=/trunk/; revision=39343
2011-10-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-8/+8
non-autogenerated epan/dissectors: Specifically: Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as the encoding parameter for proto_tree_add_item() calls which directly reference an item in hf[] which has a type of: FT_BOOLEAN FT_IPv4 FT_EUI64 FT_GUID FT_UINT_STRING Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260) svn path=/trunk/; revision=39328
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-353/+353
non-autogenerated epan/dissectors: Specifically: Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as the encoding parameter for proto_tree_add_item() calls which directly reference an item in hf[] which has a type of: FT_UINT8 FT_UINT16 FT_UINT24 FT_UINT32 FT_UINT64 FT_INT8 FT_INT16 FT_INT24 FT_INT32 FT_INT64 FT_FLOAT FT_DOUBLE svn path=/trunk/; revision=39288
2011-10-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-19/+19
reference an hf item (in hf[] with types: FT_NONE FT_BYTES FT_IPV6 FT_IPXNET FT_OID Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN svn path=/trunk/; revision=39260
2011-08-31Second try to move crc routines to libwsutil.Stig Bjørlykke1-1/+1
This time keep the tvb routines in epan. Now we can use common crc routines outside epan. svn path=/trunk/; revision=38810
2011-08-30Revert r38800, as the crc routines contains some tvb functions.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=38803
2011-08-30Move all crc routines to libwsutil.Stig Bjørlykke1-1/+1
This way we can use the crc routines in wiretap. svn path=/trunk/; revision=38800
2011-04-22Found by clang 3.0 (built from trunk): various implicit conversion fromStephen Fisher1-7/+36
enumeration type 'xxx' to different enumeration type 'xxx' Fix: Create different structs based on the enum type contained within. svn path=/trunk/; revision=36814
2011-04-21Fix Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+1
svn path=/trunk/; revision=36764
2011-04-21Fix Dead Store (Dead nested assignment) Warning found by Clang Alexis La Goutte1-2/+1
svn path=/trunk/; revision=36753
2011-01-20Fix the dead initialization warnings found by clang's static analysisStephen Fisher1-2/+2
("Value stored to 'xxx' during its initialization is never read") svn path=/trunk/; revision=35598
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-2/+2
keys to have _uint in their names, to match the routines that handle dissector tables with string keys. (Using _port can confuse people into thinking they're intended solely for use with TCP/UDP/etc. ports when, in fact, they work better for things such as Ethernet types, where the binding of particular values to particular protocols are a lot stronger.) svn path=/trunk/; revision=35224
2010-12-06Fix various typos and spelling errors.Bill Meier1-3/+3
svn path=/trunk/; revision=35126
2010-11-01Use value_string_ext fcns when accessing value_string arrays.Bill Meier1-384/+420
svn path=/trunk/; revision=34744
2010-10-11Define some fcns & vars as static;Bill Meier1-1/+1
Minor whitespace and comments cleanup. svn path=/trunk/; revision=34477
2010-04-07Squelch a compiler warning.Guy Harris1-1/+1
svn path=/trunk/; revision=32414
2010-01-10Fix for Bug 4369:Gerasimos Dimitriadis1-4/+16
Use the correct function for adding an FT_STRING field and make some checks regarding the length of parameters in cmd_manageuser(). svn path=/trunk/; revision=31476
2010-01-10Partial fix for Bug 4369:Gerasimos Dimitriadis1-1/+13
Remove the possibility of infinite loop when counting items of length 0. svn path=/trunk/; revision=31475
2010-01-07Partial fix for Bug 4369:Gerasimos Dimitriadis1-2/+12
Remove the possibility of infinite loop when command length is 0. svn path=/trunk/; revision=31463
2009-11-28proto_reg_handoff...: if (!initialized) not req'd;Bill Meier1-86/+73
Remove unneeded #includes; Use true_false_string definitions from tfs.c when possible. svn path=/trunk/; revision=31106
2009-11-28From J.C. Wren:Jaap Keuter1-0/+5685
This patch adds protocol dissection support for the Assa Abloy R3 protocol. R3 is an electronic lock management protocol for configuring operational parameters, adding/removing/altering users, dumping log files, etc. svn path=/trunk/; revision=31105