Commit graph

47281 commits

Author SHA1 Message Date
Alexis La Goutte
d34f4c3b53 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50347
2013-07-03 16:42:53 +00:00
Alexis La Goutte
58c328100d Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50346
2013-07-03 16:42:44 +00:00
Alexis La Goutte
fb9d8134c6 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50345
2013-07-03 16:42:35 +00:00
Alexis La Goutte
bfa7acca05 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50344
2013-07-03 16:42:25 +00:00
Alexis La Goutte
3dac733fb0 There dissectors is not ASN1 dissectors.... !
svn path=/trunk/; revision=50343
2013-07-03 16:42:15 +00:00
Alexis La Goutte
d9b440a07a Fix typo (Missing CR)
svn path=/trunk/; revision=50342
2013-07-03 16:42:00 +00:00
Irene Rüngeler
88ae57458f Attachment #11134 proposed as fix for bug #8899 by Peter Hatina
svn path=/trunk/; revision=50341
2013-07-03 14:12:44 +00:00
Michael Mann
0bad33df96 Fix infinite loop in VTP dissector. Bug 8887 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8887)
svn path=/trunk/; revision=50340
2013-07-03 12:42:17 +00:00
Pascal Quantin
b00abd1c43 Check actx->private_data validity before using it
svn path=/trunk/; revision=50339
2013-07-03 12:01:12 +00:00
Pascal Quantin
b91b990a77 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8880 :
Check actx->private_data validity before using it

svn path=/trunk/; revision=50338
2013-07-03 08:53:47 +00:00
Michael Mann
98492c5619 expert_add_info + proto_tree_add_text = proto_tree_add_expert, where applicable
svn path=/trunk/; revision=50337
2013-07-03 02:59:31 +00:00
Chris Maynard
fdead4df94 Fix Coverity CID 660 (Negative array index read) by holding off the assignment to yytos until after we check that pParser->yyidx is non-negative.
See also: http://cwe.mitre.org/data/definitions/129.html
#BACKPORT(1.10)

svn path=/trunk/; revision=50336
2013-07-03 02:28:26 +00:00
Chris Maynard
83b4b73dd1 Fix Coverity CID 280323 (Free of array-typed value) by ensuring that tpltname doesn't point to the buf[] stack array before attempting to free it.
#BACKPORT(1.10)

svn path=/trunk/; revision=50335
2013-07-03 01:47:18 +00:00
Guy Harris
5d87a8c461 WS_DLL_PUBLIC is now always WS_DLL_PUBLIC_NOEXTERN with "extern" added;
just define WS_DLL_PUBLIC_NOEXTERN inside the ifdefs, and define
WS_DLL_PUBLIC as WS_DLL_PUBLIC_NOEXTERN followed by "extern".

Then rename WS_DLL_PUBLIC_NOEXTERN to WS_DLL_PUBLIC_DEF, to clarify that
it's what should be used for definitions; at least on Windows, you
*have* to use it when declaring arrays without a size, and, whilst you
might be able to use WS_DLL_PUBLIC for definitions of functions and
perhaps data definitions other than no-size arrays, it might be clearer
to rename WS_DLL_PUBLIC to WS_DLL_PUBLIC_DECL and use it only for
declarations.

svn path=/trunk/; revision=50334
2013-07-03 01:43:39 +00:00
Evan Huus
a3543e6050 From Javier Godoy via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8881
Follow-up to r50308: misc bug fixes and tweaks to OSD2 dissection.

svn path=/trunk/; revision=50333
2013-07-03 01:22:54 +00:00
Guy Harris
219c37c45a OK, try having WS_DLL_PUBLIC always say "extern". If *that* doesn't
work, because it can't be used with definitions, we'll probably have to
have separate macros for declarations and definitions, as I don't think
MSVC likes

	int foo[];

in a header file but should be fine with

	extern int foo[];

Add some more comments while we're at it; you are in a twisty little
maze of #ifdefs, all different.

svn path=/trunk/; revision=50332
2013-07-03 00:38:41 +00:00
Guy Harris
f4361b8e38 If the LHS of an "expr LHS : RHS" expression has an X added to avoid
confusing expr if the LHS is an empty string, the RHS needs it as well.

Also, fix some typoes ("$X" rather than "X$"), and use lower-case "x",
as that's what's used elsewhere when doing that sort of thing.

svn path=/trunk/; revision=50331
2013-07-02 23:56:32 +00:00
Stephen Fisher
b4dca0fbd2 Change additions from r50178 from if expr "$GCC_OPTION" to if expr
"X$GCC_OPTION" so expr doesn't get confused by the GCC_OPTION that 
starts with a hyphen and spit out messages like this (on FreeBSD): 

checking whether we can add -fexcess-precision=fast to CXXFLAGS... expr:
illegal option -- f
expr: usage: expr [-e] expression

expr: illegal option -- f
expr: usage: expr [-e] expression

no


svn path=/trunk/; revision=50330
2013-07-02 23:28:51 +00:00
Guy Harris
717b358639 Methinks the "not GCC 4 or later" #defines for WS_DLL_PUBLIC and
WS_DLL_LOCAL were reversed; that might be what's causing a build error
with ui/qt/main_status_bar.cpp.

Add some comments for #else's while we're at it, so it's easier to
figure out when particular sets of #defines are used.

svn path=/trunk/; revision=50329
2013-07-02 22:08:23 +00:00
Jakub Zawadzki
9c58621893 - rename and optimize proto_data_add_maybe_interesting_field
- proto_tree_add_node() double checks if tree_type is valid remove second one (first one is more verbose)

svn path=/trunk/; revision=50328
2013-07-02 21:26:14 +00:00
Michael Mann
a6acb73611 Make expert items filterable. First use of proto_tree_add_expert.
svn path=/trunk/; revision=50327
2013-07-02 21:16:10 +00:00
Jakub Zawadzki
68c2c57037 Remove tree argument from TRY_TO_FAKE_THIS_REPR macro
PTREE_DATA should be the same for both *tree* and *pi*

svn path=/trunk/; revision=50326
2013-07-02 20:51:58 +00:00
Michael Mann
e5cb4d84cc proto_malformed SHOULD NOT be used outside of show_exception.c
svn path=/trunk/; revision=50325
2013-07-02 20:43:21 +00:00
Michael Mann
a19eaef617 Remove "global" proto_malformed and update some of the expert_info items that really aren't "malformed".
svn path=/trunk/; revision=50324
2013-07-02 20:25:14 +00:00
Michael Mann
7ae263b9e4 Differentiate "Disabled" from "Unknown" and provide macros for the enumerated values.
svn path=/trunk/; revision=50323
2013-07-02 20:08:49 +00:00
Michael Mann
e16933f496 Add proto_tree_add_expert and proto_tree_add_expert_format. This was added 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-02 19:53:28 +00:00
Jakub Zawadzki
b0e04aca73 Rewrite proto_lookup_or_create_interesting_hfids() and rename to 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-02 19:23:10 +00:00
Jakub Zawadzki
1d2409dd69 Micro-optimize common case for proto_tree_add_pi() assume tree != NULL, pfi != NULL
Fix calles.

svn path=/trunk/; revision=50320
2013-07-02 18:56:48 +00:00
Jakub Zawadzki
cce4ad3c66 tree == NULL check is already done by TRY_TO_FAKE_THIS_ITEM() macro.
svn path=/trunk/; revision=50319
2013-07-02 18:45:47 +00:00
Jakub Zawadzki
874f119225 Remove not needed TRY_TO_FAKE_THIS_ITEM() from proto_tree_*_format & 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-02 18:36:00 +00:00
Gerald Combs
b2788e5687 Preserve symlinks when copying libraries into the application bundle on
OS X so that it doesn't become excessively large.

svn path=/trunk/; revision=50317
2013-07-02 18:26:52 +00:00
Jakub Zawadzki
d27f026884 cleanup, put result of decode_bitfield_value directly to fi->rep->representation
svn path=/trunk/; revision=50316
2013-07-02 17:09:38 +00:00
Michael Mann
090ddb6afc Remove dependency on proto_malformed as it should be encapsulated in expert info API (through show exception API)
svn path=/trunk/; revision=50315
2013-07-02 16:51:03 +00:00
Jakub Zawadzki
2ab52de572 Add TRY_TO_FAKE_THIS_REPR into proto_tree_set_representation_value() call.
Remove TRY_TO_FAKE_THIS_REPR from calling functions.

svn path=/trunk/; revision=50314
2013-07-02 16:09:56 +00:00
Michael Mann
ecc4e4789e Cache the malformed filter instead of looking it up each time a malformed 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-02 16:02:31 +00:00
Jeff Morriss
0643b22517 From Roland Knall via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8878 :
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-02 14:15:40 +00:00
Jakub Zawadzki
d0c5a5561d snprintf -> strlcpy.
svn path=/trunk/; revision=50311
2013-07-02 14:14:52 +00:00
Michael Mann
14d105ee4c Make expert items filterable and a little cleanup.
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-01 23:59:05 +00:00
Evan Huus
a0d874ae0a From Fabio Tarabelloni via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8718

Misc. minor improvements to zigbee zcl.

svn path=/trunk/; revision=50309
2013-07-01 23:21:44 +00:00
Evan Huus
be688c88f2 From Javier Godoy via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8832
Support for OSD-2/3 in the SCSI dissector.

svn path=/trunk/; revision=50308
2013-07-01 23:17:06 +00:00
Bill Meier
02a6c2b462 Do whitespace cleanup;
Reformat hf[] entries.

svn path=/trunk/; revision=50307
2013-07-01 20:54:15 +00:00
Chris Maynard
c015eb1972 Add some casts to try to appease the Ubuntu buildbot, which is angry from r50303.
svn path=/trunk/; revision=50306
2013-07-01 20:38:12 +00:00
Chris Maynard
b26abebc27 Fix Coverity CID 280618 (Dereference before null check).
#BACKPORT(1.10,1.8)

svn path=/trunk/; revision=50305
2013-07-01 20:25:49 +00:00
Evan Huus
8dfe279520 Remove unused parameters.
svn path=/trunk/; revision=50304
2013-07-01 19:55:39 +00:00
Chris Maynard
b14de31a4c Fix Coverity CID 997052 (Infinite loop) by declaring 'err' volatile.
#BACKPORT(1.10)

svn path=/trunk/; revision=50303
2013-07-01 19:52:32 +00:00
Michael Mann
71e6d4be77 Made an attempt at making all TCP expert info filterable. Many of the 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-01 16:32:52 +00:00
Chris Maynard
3f0aefb91e Fix Coverity CID 1035326 (Improper use of negative value) by guarding against tvb_reported_length_remaining() possibly returning -1.
#BACKPORT(1.10,1.8)

svn path=/trunk/; revision=50301
2013-07-01 16:29:17 +00:00
Bill Meier
828d4e89f6 Define certain 'const char *...' arrays as static.
(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-01 15:41:05 +00:00
Jakub Zawadzki
7b5a0e4a15 Cleanup fill_label_[u]int64 to fill_label_number64
svn path=/trunk/; revision=50299
2013-07-01 15:24:42 +00:00
Chris Maynard
ff8842c865 Fix Coverity CID 1037114 (Dereference before null check).
svn path=/trunk/; revision=50298
2013-07-01 15:20:02 +00:00