aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-07-02Add proto_tree_add_expert and proto_tree_add_expert_format. This was added ↵Michael Mann2-2/+84
to expert.h instead of proto.h because the underlying code to process expert info is static (and should probably remain so). Also, proto_tree_add_expert and proto_tree_add_expert_format follow "expert info" rules in that they should be called regardless of tree status (even though they take a tree as an argument), unlike the functions in proto.h Also added an enumeration for checksum validation status, as verifying checksums is considered "expert" functionality. svn path=/trunk/; revision=50322
2013-07-02Rewrite proto_lookup_or_create_interesting_hfids() and rename to ↵Jakub Zawadzki1-27/+13
proto_data_add_maybe_interesting_field Now proto_data_add_maybe_interesting_field: - it actually add field_info to interesting hash_tree - accept only required parameters - is called only by proto_tree_add_node svn path=/trunk/; revision=50321
2013-07-02Micro-optimize common case for proto_tree_add_pi() assume tree != NULL, pfi ↵Jakub Zawadzki1-11/+9
!= NULL Fix calles. svn path=/trunk/; revision=50320
2013-07-02tree == NULL check is already done by TRY_TO_FAKE_THIS_ITEM() macro.Jakub Zawadzki1-3/+0
svn path=/trunk/; revision=50319
2013-07-02Remove not needed TRY_TO_FAKE_THIS_ITEM() from proto_tree_*_format & ↵Jakub Zawadzki1-244/+180
proto_tree_*_format_value Right now for proto_tree_add format & _format_value TRY_TO_FAKE_THIS_ITEM() is called twice one from 'format' function, second time from 'no format' function. This reduces size of .text by 10K: text data bss dec hex filename 76012 112 56 76180 12994 proto-after.o 86324 112 56 86492 151dc proto-before.o svn path=/trunk/; revision=50318
2013-07-02Preserve symlinks when copying libraries into the application bundle onGerald Combs1-1/+1
OS X so that it doesn't become excessively large. svn path=/trunk/; revision=50317
2013-07-02cleanup, put result of decode_bitfield_value directly to fi->rep->representationJakub Zawadzki1-13/+9
svn path=/trunk/; revision=50316
2013-07-02Remove dependency on proto_malformed as it should be encapsulated in expert ↵Michael Mann1-9/+7
info API (through show exception API) svn path=/trunk/; revision=50315
2013-07-02Add TRY_TO_FAKE_THIS_REPR into proto_tree_set_representation_value() call.Jakub Zawadzki1-40/+11
Remove TRY_TO_FAKE_THIS_REPR from calling functions. svn path=/trunk/; revision=50314
2013-07-02Cache the malformed filter instead of looking it up each time a malformed ↵Michael Mann1-1/+4
packet comes in. This drastically speeds up the load time of captures with lots of malformed packets (ie fuzztesting). svn path=/trunk/; revision=50313
2013-07-02From Roland Knall via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8878 :Jeff Morriss1-43/+43
The final maintenance patch, after excessive testing of the dissection engine. The last two bugs were: - FindSafetyFrame did not recognize the correct CRC, which in itself did not lead to wrongly detected packages, but was inconsistent with the rest. - CRC == 0 - because 0 is a valid result for the CRC value. svn path=/trunk/; revision=50312
2013-07-02snprintf -> strlcpy.Jakub Zawadzki1-5/+4
svn path=/trunk/; revision=50311
2013-07-01Make expert items filterable and a little cleanup.Michael Mann1-184/+142
Remove NULL tree check at start of dissection to ensure expert info is populated. Overall I think the logic could be a little cleaner (length checking and its tie to expert info seems excessive), but I'm not familiar enough to be comfortable making the changes. This dissector appears to be vulnerable to DOS attacks through its unsigned 16-bit length fields (just from static inspection). Having the length be a signed 32-bit value even if the length in the protocol field is an unsigned 16-bit value could simplify some of the logic. svn path=/trunk/; revision=50310
2013-07-01From Fabio Tarabelloni viaEvan Huus1-20/+15
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8718 Misc. minor improvements to zigbee zcl. svn path=/trunk/; revision=50309
2013-07-01From Javier Godoy via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8832Evan Huus2-136/+452
Support for OSD-2/3 in the SCSI dissector. svn path=/trunk/; revision=50308
2013-07-01Do whitespace cleanup;Bill Meier1-123/+171
Reformat hf[] entries. svn path=/trunk/; revision=50307
2013-07-01Add some casts to try to appease the Ubuntu buildbot, which is angry from ↵Chris Maynard1-3/+3
r50303. svn path=/trunk/; revision=50306
2013-07-01Fix Coverity CID 280618 (Dereference before null check).Chris Maynard1-2/+2
#BACKPORT(1.10,1.8) svn path=/trunk/; revision=50305
2013-07-01Remove unused parameters.Evan Huus1-10/+5
svn path=/trunk/; revision=50304
2013-07-01Fix Coverity CID 997052 (Infinite loop) by declaring 'err' volatile.Chris Maynard1-1/+1
#BACKPORT(1.10) svn path=/trunk/; revision=50303
2013-07-01Made an attempt at making all TCP expert info filterable. Many of the ↵Michael Mann1-265/+99
expert info "items" are shared with a FT_NONE (hf_ display) filter, so I replaced the FT_NONE filter used with proto_tree_add_none_format() and just went with an expert info "item" with the same display filter name. The text between the "text" item and the "expert info" item varied, so I'd tried to best merge the two. "tcp.analysis.duplicate_ack" has both an hf_ and ei_ "item" so that the duplicate ack # and frame # can be assembled properly in the tree. Since hf_tcp_analysis_duplicate_ack is of type FT_NONE, the duplicative display filter name is okay. svn path=/trunk/; revision=50302
2013-07-01Fix Coverity CID 1035326 (Improper use of negative value) by guarding ↵Chris Maynard1-0/+2
against tvb_reported_length_remaining() possibly returning -1. #BACKPORT(1.10,1.8) svn path=/trunk/; revision=50301
2013-07-01Define certain 'const char *...' arrays as static.Bill Meier4-5/+5
(That is: Don't create the array on the stack each time the function is called). Reduces code memory usage and execution time. (See SVN #50271) svn path=/trunk/; revision=50300
2013-07-01Cleanup fill_label_[u]int64 to fill_label_number64Jakub Zawadzki1-32/+14
svn path=/trunk/; revision=50299
2013-07-01Fix Coverity CID 1037114 (Dereference before null check).Chris Maynard1-0/+2
svn path=/trunk/; revision=50298
2013-07-01Fix Coverity CID 1040373 (Dereference before null check). Minor whitespace ↵Chris Maynard2-84/+84
changes come along for the ride on this one. svn path=/trunk/; revision=50297
2013-07-01Define certain 'const char *...' arrays as static.Bill Meier2-4/+4
(That is: Don't create the array on the stack each time the function is called). Reduces code memory usage and execution time. (See SVN #50271) svn path=/trunk/; revision=50296
2013-07-01 Define certain 'const char *...' arrays as static.Bill Meier10-48/+48
(That is: Don't create the array on the stack each time the function is called). Reduces code memory usage and execution time. (See SVN #50271) svn path=/trunk/; revision=50295
2013-07-01From Roland Knall via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8877 :Jeff Morriss1-0/+4
In my last patch (bug #8847), I overlooked a place where I had to check for the old CRC as well, which led to packages that were not detected anymore. This 4 lines fix it. As usual, the patch was tested and works. svn path=/trunk/; revision=50294
2013-07-01Revert r50287: the P1 dissector isn't clean yet ('dissect_p1_T_report_type' ↵Jeff Morriss1-1/+1
defined but not used) svn path=/trunk/; revision=50293
2013-07-01Define certain 'const char *...' arrays as static.Bill Meier18-73/+75
Reduces code memory usage and execution time. (See SVN #50271) svn path=/trunk/; revision=50292
2013-07-01Fix typo in retrieving h263 dissector. Bug 7893 ↵Michael Mann1-1/+1
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7893) From Michal Labedzki svn path=/trunk/; revision=50291
2013-07-01Rewrite hfinfo_numeric_value_format as a special case for ↵Jakub Zawadzki1-157/+63
_hfinfo_number_value_format cleanup some functions. svn path=/trunk/; revision=50290
2013-07-01Fix Coverity CID 1025626 (Unintentional integer overflow) by declaring 1 as ↵Chris Maynard1-28/+28
a 64-bit unsigned integer using G_GUINT64_CONSTANT(). svn path=/trunk/; revision=50289
2013-07-01Fix Coverity CID 712348 (Unused pointer value).Chris Maynard2-2/+2
svn path=/trunk/; revision=50288
2013-07-01packet-p1.c should now be clean.Guy Harris1-1/+1
svn path=/trunk/; revision=50287
2013-07-01Squelch some warnings.Guy Harris6-20/+20
svn path=/trunk/; revision=50286
2013-07-01Get rid of variable, 'end'.Chris Maynard1-3/+1
svn path=/trunk/; revision=50285
2013-07-01Return from dissect_at_command() immediately if tvb_length_remaining() ↵Chris Maynard1-5/+11
returns -1. svn path=/trunk/; revision=50284
2013-07-01Fix Coverity CID 1040372 (Printf arg count mismatch) by eliminating the ↵Chris Maynard2-4/+4
double %'s. svn path=/trunk/; revision=50283
2013-07-01There are a few dissectors that pass the return value of ↵Chris Maynard1-9/+12
tvb_length_remaining() as the size argument to the tvb_format_*() functions. Try to do something sane if that value happens to be -1 (or negative in general). One such example is packet-bthfp.c, as found and reported by Coverity in CID 1035325 (Improper use of negative value). Note: There are other ways to handle this of course, but this fix is suitable for backporting to both 1.10 and 1.8, as it does not break binary compatibility. Is there a better way to fix this though? For now, schedule this for backport. svn path=/trunk/; revision=50282
2013-07-01Fix Coverity CID 1040636 (Out-of-bounds read) by changing the loop ↵Chris Maynard1-5/+3
termination condition from "i < ZBEE_ZCL_NUM_ATTR_ETT" to "i < ZBEE_ZCL_APPL_CTRL_NUM_FUNC_ETT". The former is defined as 64 while the latter is defined as 32 and ett_zbee_zcl_appl_ctrl_func[], which is indexed within the loop, has only 32 entries. svn path=/trunk/; revision=50281
2013-07-01Fix Coverity CID's 1037112, 1037113 and 1040635 (Explicit null dereferenced).Chris Maynard1-272/+253
svn path=/trunk/; revision=50280
2013-07-01A better fix than r50278.Chris Maynard1-36/+32
svn path=/trunk/; revision=50279
2013-07-01Realized that Coverity would have still complained about "explicit null ↵Chris Maynard1-46/+53
dereferences", so add in some additional checks. svn path=/trunk/; revision=50278
2013-07-01Consistently maintain the callState member of an iax2_info_t structureGuy Harris2-47/+48
as a voip_call_state value; don't have it sometimes a voip_call_state and sometimes a frame subtype. This should squelch some complaints from newer versions of Clang about unnecessary array-bounds checks - the array-bounds checks are done on frame subtypes, where they *are* necessary (nothing prevents an untrustworthy IAX2 implementation or an untrustworthy capture file writer from putting an arbitrary value in the packets), not on voip_call_state values (where it was only necessary because the value wasn't, in that case, a voip_call_state value, it was a frame subtype cast to a voip_call_state). svn path=/trunk/; revision=50277
2013-07-01Use tvb_reported_length_remaining() instead of tvb_length_remaining().Chris Maynard1-13/+15
svn path=/trunk/; revision=50276
2013-07-01Fix Coverity CID 280550 (Dereference null return value) by checking that ↵Chris Maynard1-7/+12
ieee_hints is not NULL before dereferencing it (as is done in all other cases). svn path=/trunk/; revision=50275
2013-07-01Fix Coverity CID 1040370 (Explicit null dereferenced) by removing the if ↵Chris Maynard1-46/+38
(tree) { ... } tests so that payload_tree is always assigned regardless of whether tree is NULL or not. Fix Coverity CID 1040371 (Negative loop bound) by not assignin the return value of tvb_length_remaining() to an unsigned integer and then using that value for loop termination. Instead, assign the return value to a signed integer and only if tvb_length_remaining() returns a value greater than zero do we even begin to loop. In addition, use tvb_length_remaining() instead of tvb_length() to determine if more data exists, and then if it does, when displaying the payload bytes following the cmd_id, only pass the number of remaining bytes following the cmd_id rather than the entire length, which would include the 1 byte for the cmd_id itself. Other minor changes. svn path=/trunk/; revision=50274
2013-07-01ANother iteration,Luis Ontanon8-136/+420
- started harvesting pieces from tshark. - fixed? signal handlers - interactive test program very hard to debug... set follow-on-fork doesn't seem to work on my mac. Need linux I guess... svn path=/trunk/; revision=50273