Commit Graph

1326 Commits

Author SHA1 Message Date
Jörg Mayer a8002aa0b7 Fix two coverity messages:
*** CID 718534:  Dereference before null check  (REVERSE_INULL)
/tools/lemon/lemon.c: 3425 in translate_code()
3419                rp->rhs[i]->index,i-rp->nrhs+1);
3420           }else{
3421             /* No destructor defined for this term */
3422           }
3423         }
3424       }
>>>     CID 718534:  Dereference before null check  (REVERSE_INULL)
>>>     Null-checking "rp->code" suggests that it may be null, but it has already been
+dereferenced on all paths leading to the check.
3425       if( rp->code ){
3426         cp = append_str(0,0,0,0);
3427         rp->code = Strsafe(cp?cp:"");
3428       }
3429     }
3430

*** CID 1156989:  Out-of-bounds read  (OVERRUN)
/tools/lemon/lemon.c: 3139 in tplt_xfer()
3133       int i, iStart;
3134       char line[LINESIZE];
3135       while( fgets(line,LINESIZE,in) && (line[0]!='%' || line[1]!='%') ){
3136         (*lineno)++;
3137         iStart = 0;
3138         if( name ){
>>>     CID 1156989:  Out-of-bounds read  (OVERRUN)
>>>     Overrunning array "line" of 1000 bytes at byte offset 1000 using index "i"
+(which evaluates to 1000).
3139           for(i=0; line[i] && i<LINESIZE; i++){
3140             if( line[i]=='P' && i<(LINESIZE-5) && strncmp(&line[i],"Parse",5)==0
3141               && (i==0 || !safe_isalpha(line[i-1]))
3142             ){
3143               if( i>iStart ) fprintf(out,"%.*s",i-iStart,&line[iStart]);
3144               fprintf(out,"%s",name);

svn path=/trunk/; revision=54849
2014-01-19 17:59:20 +00:00
Gerald Combs 8424cf3f8c Add environment checks. Add a topic to our refspec.
Check for a 'gerrit' remote and for a commit-msg hook. The hook script
doesn't work on my system. This might be due to
http://code.google.com/p/gerrit/issues/detail?id=843

svn path=/trunk/; revision=54838
2014-01-18 00:03:02 +00:00
Gerald Combs 705083d279 If you use bashisms it means you're a bash script.
svn path=/trunk/; revision=54829
2014-01-16 19:42:13 +00:00
Gerald Combs 8db4bc2499 More Chocolatey lex/yacc updates.
Add Windows-style path handling to runlex.sh. Update the example
Chocolatey LEX path accordingly. This lets us use path information in
LEX and have it work in both nmake and runlex.sh

Add a FindChocolatey.cmake module. Update FindLEX and FindYACC to use it.
The code is currently untested and commented out.

svn path=/trunk/; revision=54828
2014-01-16 18:57:29 +00:00
Gerald Combs d5b706be51 Allow the use of Win flex-bison and document how to do that.
svn path=/trunk/; revision=54824
2014-01-16 01:28:02 +00:00
Guy Harris 833d315c02 Document {CODE,HEADER} {START,END}.
Clean up indentation.

svn path=/trunk/; revision=54721
2014-01-13 21:18:29 +00:00
Guy Harris a2979508d0 Add HEADER START and HEADER END, similar to CODE START and CODE END, to
allow stuff to be put into the .h file; that way, if you put helper
functions into the .c file, for use by dissectors other than the one
being generated, you can put declarations for them into the .h file.

Do some checks for mis-nesting of CODE and HEADER blocks.

Clean up the "this is generated code" header.

svn path=/trunk/; revision=54720
2014-01-13 21:05:44 +00:00
Guy Harris 61d5c458a0 Squelch some warnings.
svn path=/trunk/; revision=54711
2014-01-13 19:07:48 +00:00
Gerald Combs 1a279aca25 Update the enterprise-numbers URL.
svn path=/trunk/; revision=54694
2014-01-10 22:57:28 +00:00
Gerald Combs 870635c248 The IEEE OUI, IAB, and OUI-36 lists currently redirect to
http://standards.ieee.org/regauthmaint.html, which says

IEEE Registration Authority Services will be unavailable from Friday, December 27th through Monday, December 30th

As a result the manuf file got clobbered. Revert the manuf file to
its non-clobbered state and add sanity checks to make-manuf. Add a
note about the impending addition of OUI-28.

svn path=/trunk/; revision=54485
2013-12-29 17:28:12 +00:00
Jakub Zawadzki 6bb97fa327 Generate prototype for plugin_reg_handoff()
This should fix warnings:
 plugin.c:XX:1: warning: no previous prototype for 'plugin_reg_handoff' [-Wmissing-prototypes]

svn path=/trunk/; revision=54475
2013-12-27 15:46:50 +00:00
Anders Broman d0915cabb3 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54473
2013-12-27 10:49:35 +00:00
Jakub Zawadzki 3778699fb5 Commit sample program to generate charsets.c tables using iconv()
For now only single-byte, and it must be possible to encode whole charset as UCS-2

svn path=/trunk/; revision=54324
2013-12-21 11:44:31 +00:00
Jakub Zawadzki 064082e68a Change G_GINT64_CONSTANT(xxxxU) to G_GUINT64_CONSTANT(xxxx)
svn path=/trunk/; revision=54314
2013-12-20 22:39:32 +00:00
Michael Mann 959a290961 proto_tree_add_text -> proto_tree_add_xxx conversion.
svn path=/trunk/; revision=54274
2013-12-19 21:51:09 +00:00
Jeff Morriss 6762f7e0c8 Some patches from Peter Harris:
[PATCH 1/5] X11 dissector: Sort declarations
This prevents pointless changes showing up in the diff when evaluating
unrelated changes to the generator.

See http://search.cpan.org/dist/perl-5.18.0/pod/perldelta.pod#Hash_randomization

[PATCH 2/5] X11 dissector: Silence warnings on perl 5.18, prevent 5.20
Perl 5.18 retroactively marked "given/when" experimental, with a
promise to remove or dramatically change it in 5.20.

Since there is no perl 5.20 yet, there is no way to make this script
compatible with it.

[PATCH 3/5] X11 dissector: Support variable_param (at least for glCallLists)
(This patch makes the change in r54232 unnecessary by using the previously-
unused variable.)

[PATCH 4/5] X11 dissector: Remove obsolete TODO item
This item was done in r53531 PATCH 09/11

svn path=/trunk/; revision=54242
2013-12-19 02:32:21 +00:00
Michael Mann f882b63d97 Some proto_tree_add_xxx functions have a '_' in the function name so make sure they get counted in the proto_tree_add_text percentage.
Makes a few dissectors look a little better.

svn path=/trunk/; revision=54236
2013-12-18 22:10:59 +00:00
Gerald Combs 5385c2d5f8 Instead of assigning a variable to itself, avoid unused warnings similar
to the Q_UNUSED macro.

svn path=/trunk/; revision=54232
2013-12-18 20:53:01 +00:00
Anders Broman e8b935ad6e Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54209
2013-12-18 06:51:09 +00:00
Evan Huus 4cb6a92d93 Change the exit status of a fuzz failure to 255 so that if you use it with xargs
the failures don't get suppressed.

svn path=/trunk/; revision=54071
2013-12-13 22:15:29 +00:00
Gerald Combs 10d8530102 Switch the cherry-pick merge strategy to "recursive + theirs", which
seems to pull in fewer changes and be less prone to conflitcs. This was
the case for r53086, at least.  Add "-x" which adds a "cherry picked
from..." line to the commit message.

Show a diff before pushing.

svn path=/trunk/; revision=54007
2013-12-13 01:40:36 +00:00
Gerald Combs a43efdb873 Fix redirection.
svn path=/trunk/; revision=54003
2013-12-13 00:05:32 +00:00
Gerald Combs 07b56cf62f Don't cherry-pick if we have changes.
svn path=/trunk/; revision=54001
2013-12-13 00:03:19 +00:00
Gerald Combs 9b0b75703f Add a "backport-change" script which cherry-picks a proposed backport
and pushes it to Gerrit.

svn path=/trunk/; revision=53999
2013-12-12 23:38:54 +00:00
Tomas Kukosa 0a626c33c8 Ply parser updated to 3.5 (from GitHub github.com/dabeaz/ply)
svn path=/trunk/; revision=53782
2013-12-04 14:45:32 +00:00
Alexis La Goutte 6b10f16ca8 From Anders request Add prototype for corba/idl dissector
svn path=/trunk/; revision=53778
2013-12-04 09:53:21 +00:00
Jakub Zawadzki cedb73c7f7 Dissectors should not use dfilter.h, don't include it.
XXX ncp2222 dissector is using dfilter_compile(), why?

svn path=/trunk/; revision=53766
2013-12-03 21:31:04 +00:00
Alexis La Goutte 3fc5a3e845 Add modelines info to idl generate file
svn path=/trunk/; revision=53754
2013-12-03 13:38:38 +00:00
Alexis La Goutte de65892796 Fix indent for generated file (Use 4 space)
svn path=/trunk/; revision=53753
2013-12-03 13:38:30 +00:00
Alexis La Goutte a637d81706 Fix generator don't generate trailing whitespace
svn path=/trunk/; revision=53752
2013-12-03 13:38:23 +00:00
Alexis La Goutte 225161b1be Remove trailing whitespace and add modelines info
svn path=/trunk/; revision=53751
2013-12-03 13:38:15 +00:00
Alexis La Goutte ede151cbba Remove whitespace and add modelines info
svn path=/trunk/; revision=53750
2013-12-03 13:38:07 +00:00
Alexis La Goutte 76db825c84 Add #pragma to idl generator...
svn path=/trunk/; revision=53746
2013-12-03 13:37:31 +00:00
Gerald Combs 4e2b6b13f6 Use 4-space (PEP 8) indentation. Add modelines.
svn path=/trunk/; revision=53685
2013-12-01 01:53:26 +00:00
Gerald Combs c02bbf9883 Use indentation recommended by PEP 8.
svn path=/trunk/; revision=53684
2013-12-01 01:46:45 +00:00
Gerald Combs 80b4bc004a Fix compatibility with Python 2.5. Tested with 2.5, 2.6, 2.7, and 3.3.
svn path=/trunk/; revision=53683
2013-12-01 01:35:13 +00:00
Jörg Mayer fb22ecce8d Graham Bloice
I've now got tshark to build from a VS solution file, had to do some hacks
to get there though, patch files attached for others to peruse, as I'm not
sure if they are the optimal solutions:

   3. As mentioned in my previous message, the VS solution chops out every
   8192nd byte from the command line passed to make-dissector-reg.py.  My
   patch (make-reg.patch) gets CMake to write out the required source file
   list to a file and modifies the python script to read in the file.  The
   python changes *should* be backwards compatible.

Me: Small fix to UseMakeDissectorReg.cmake (elseif() -> else())

svn path=/trunk/; revision=53654
2013-11-29 19:57:00 +00:00
Balint Reczey 2ec033d15e Fix potential signed int overflow in Lemon
This chrashed Solaris buildbot when -ftrapv was enabled.
Triaged by Guy Harris, see detail at:
http://www.wireshark.org/lists/wireshark-dev/201311/msg00185.html

svn path=/trunk/; revision=53624
2013-11-28 16:04:33 +00:00
Jeff Morriss 8993524953 Delete the svn:executable property on added files (we might add it back later).
svn path=/trunk/; revision=53587
2013-11-25 22:57:24 +00:00
Michael Mann e2df7c83cb Move dceprc_procedure_name from packet_info to dcerpc_info. Doesn't appear to be "used" by dissectors, just stored (for help in debugging?).
svn path=/trunk/; revision=53552
2013-11-24 20:55:55 +00:00
Jeff Morriss a98072967e Fix checkAPIs: don't try to feed VALS() into FT_BOOLEANs.
Also, as per Peter Harris' request, update copyright date.

svn path=/trunk/; revision=53545
2013-11-24 14:27:52 +00:00
Jeff Morriss a434d9647e Some patches from Peter Harris to make it possible to build the X11 dissector
again (and some various other improvements):

Rebuild the dissector with the latest xcbproto and mesa.


Subject: [PATCH 01/11] X11 dissector: Support CARD64 and INT64 types
These types are used by the new Present extension.

Subject: [PATCH 02/11] X11 dissector: Un-blacklist a few structures
The xinput structs are used by the latest xcb/proto, and the xkb
struct has been removed.

Subject: [PATCH 03/11] X11 dissector: Add hack for xinput:ChangeProperty
xinput:ChangeProperty should use switch/case, but only switch/bitcase
is supported at the moment. Add (hopefully temporary) hack.

Subject: [PATCH 04/11] X11 dissector: Use namespace for types
In particular, the name of the xsync struct 'INT64' collides with a
basic type of the same name.

Subject: [PATCH 05/11] X11 dissector: Add support for "Generic" events
All new extensions are using the new "Generic" events instead of
traditional events, because there aren't enough traditional event
numbers.

Denoted by <event xge="true"> in xcb/proto.

Subject: [PATCH 06/11] X11 dissector: Blacklist unused structures

Subject: [PATCH 07/11] X11 dissector: Support multiple enumref in a bitcase
XKB is weird.

Subject: [PATCH 08/11] X11 dissector: Support sumof

Subject: [PATCH 09/11] X11 dissector: Stop generating unused-but-set variables
(This patch also reverts r53298/r53299.)

svn path=/trunk/; revision=53531
2013-11-24 01:32:20 +00:00
Evan Huus d97c9e2ff4 Implement address_to_str which is like ep_address_to_str and se_address_to_str
except it takes a wmem scope instead. Add the two emem equivalents to checkAPI
as (weakly) deprecated.

svn path=/trunk/; revision=53528
2013-11-23 22:17:27 +00:00
Evan Huus 11d8147ab5 Add exception for cmake/TestWindowsFSeek.c it is copied from upstream under a
valid license, but has no recognizable header and there's no reason to carry the
delta.

svn path=/trunk/; revision=53518
2013-11-22 23:46:00 +00:00
Pascal Quantin ea45be32c5 Add a way to retrieve a PER variable bit string length
svn path=/trunk/; revision=53382
2013-11-17 13:31:32 +00:00
Jeff Morriss 38eac2f54f Wrap GCC pragma in an #ifdef to make it compile when we're not using GCC.
Again, change manually applied to the .h file.

svn path=/trunk/; revision=53299
2013-11-13 14:00:45 +00:00
Jeff Morriss 8893d3d960 Use a gcc pragma to stop the (pages of) warnings coming out of
x11-extensions-implementation.h .

This change was manually applied to the .h file as I can't currently rebuild
the X11 dissector.

svn path=/trunk/; revision=53298
2013-11-13 03:20:37 +00:00
Bill Meier 8f888557af Add -P option to allow specifying the 'callgrind-out-file' name
svn path=/trunk/; revision=53250
2013-11-11 18:44:50 +00:00
Jakub Zawadzki ae59b09443 Add missing includes in order to remove exceptions.h from proto.h (next commit).
svn path=/trunk/; revision=53230
2013-11-10 15:59:37 +00:00
Jakub Zawadzki 12d1509aa1 Move struct _ftype_t + callback typedefs + free macro to ftypes-int.h
svn path=/trunk/; revision=53223
2013-11-10 13:14:09 +00:00