Commit Graph

15 Commits

Author SHA1 Message Date
Jörg Mayer eab0aeb4bb More char -> const char fixes
Declare some functions static

svn path=/trunk/; revision=15158
2005-07-30 16:34:38 +00:00
Guy Harris ab797734dd Get rid of the private "my_match_strval()" routine in many dissectors;
add a "match_strval_idx()" routine that does the same thing, and have
"match_strval()" call it.

Make those routines, and "val_to_str()", return a "const" pointer. 
Update dissectors as necessary to squelch compiler warnings produced by
that.

Use "val_to_str()" rather than using "match_strval()" and then, if the
result is null, substituting a specific string.  Clean up some other
"match_strval()"/"val_to_str()" usages.

Add a null pointer check in the NDPS dissector's "attribute_value()"
routine, as it's not clear that "global_attribute_name" won't be null at
that point.

Make some global variables in the AFS4INT dissector local.

Make some routines not used outside the module they're in static.

Make some tables "static const".

Clean up white space.

Fix Gerald's address in some files.

svn path=/trunk/; revision=14786
2005-06-26 19:56:52 +00:00
Gerald Combs 3a6c9ab134 Fix a format string vulneratility in the AFP dissector identified
by iDEFENSE.  Add constant format strings to proto_item_append_text()
in a bunch of other dissectors.  Copy a comment from proto.c to proto.h.

svn path=/trunk/; revision=14713
2005-06-20 19:35:58 +00:00
Gerald Combs b94621701c From Steve Grubb:
Fix bounds checking in lemon.c.  Fix up an if/else block in
packet-dcerpc-samr.c.  Fix hex printing in packet-gtp.c.


Fix other problems discovered by Steve:

Fix a bounds check in packet-isis-lsp.c.  Also, fix netmask printing
on non-little-endian machines.  Add a comment about adding a netmask
routine to to_str.c.  Add bounds checks to packet-ncp2222.inc.


All of these apply to bug 217.

svn path=/trunk/; revision=14627
2005-06-14 18:18:05 +00:00
Ulf Lamping fdb5b1af02 just to get things straight: a dissector should *never* do any g_assert() calls!
in a simple approach, I've replaced all g_assert() and g_assert_not_reached() calls by their exception throwing counterparts DISSECTOR_ASSERT() and DISSECTOR_ASSERT_NOT_REACHED()

this will replace application crash by showing a dissector bug, which is the desired behaviour

there were some g_assert calls in the protocol registering functions, which might not be acting as expected now, but to be able to simply search for g_assert in the future I've replaced that calls too

one g_assert remained, the one when someone throws an unknown exception "into" packet_frame.c, but IMHO this one should remain.

svn path=/trunk/; revision=14608
2005-06-10 18:28:22 +00:00
Ulf Lamping b88fc96be7 fix call to show_fragment_seq_tree() reported by buildbot
svn path=/trunk/; revision=14532
2005-06-02 22:11:22 +00:00
Gerald Combs c7dfef6321 Break out of another large-but-not-infinite loop. Fixes bug 143.
svn path=/trunk/; revision=14229
2005-04-29 14:25:07 +00:00
Gerald Combs e3a76369d1 Break out of a really large (but not infinite) loop.
svn path=/trunk/; revision=14226
2005-04-29 00:16:22 +00:00
Gerald Combs e1a597eccf Add some tvb_ensure_bytes_exist() calls. Fixes bug 101.
svn path=/trunk/; revision=14192
2005-04-26 20:55:26 +00:00
Gerald Combs dfc96b3d23 In get_string(), throw an exception if the string is too long to
process.  Hopefully this doesn't break anything.  Add a bunch of
tvb_ensure_bytes_exist() calls.  Fixes bugs 48 - 51.

svn path=/trunk/; revision=14159
2005-04-21 18:19:38 +00:00
Ronnie Sahlberg 3fbcc50513 From Greg Morris
Fix the breakage from my previous patch


svn path=/trunk/; revision=14022
2005-04-07 08:32:49 +00:00
Ronnie Sahlberg d430320b6a the netware dissector is the only dissector that accesses fvalue_ functions directly.
this made it crash for some packets when the filter speedup patch was enabled, since some of these finfo nodes did no longer exist.

as far as i can tell the only other instances of fvalue_ usage is from some tap based functions but all those do take care to make sure that the fields being accessed are all part of a filter, and will thus never be optimized away.

The patch does two things

1, refactor the code but do not change the logic to reduce the number of places where the external fvalue_ functions are called from.

2, add code to force the tree to be visible (and thus change the code) so that the speedup patch will not optimize these fiuelds away.




svn path=/trunk/; revision=14009
2005-04-04 04:14:41 +00:00
Anders Broman 851ecd2ac4 From Jon Ringle:
1) Added a setup_frame parameter to conversation_t
2) Used the conversation_t next to maintain a list of conversations with the 
same src/dest tuple but different setup_frame number.
3) Changed the signature of find_conversation() and conversation_new() to pass 
in the frame number.
4) Adjusted packet-sdp to select RTP conversation if both m=audio and m=image 
are present, and T.38 conversation if only m=image is present. I expect that 
RTP/T.38 dissecting to be better, but I don't have a way to generate T.38 
packets.

svn path=/trunk/; revision=13243
2005-02-02 20:07:03 +00:00
Guy Harris 5d1de30923 From Greg Morris:
1. Fix Fax Number NDS attribute.  This was causing malformed
	   packet message due to improper decoding. 

	2. Do not try to decode packet beyond connection status when
	   return value is non-zero (error condition).

svn path=/trunk/; revision=11836
2004-08-26 07:46:29 +00:00
Gilbert Ramirez 669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00