Commit Graph

81 Commits

Author SHA1 Message Date
Jeff Morriss 3dec62b85c - s/ntohs/g_ntohs
- s/ntohl/g_ntohl
- s/free/g_free
- Change some tvb_get_string()+g_free()'s into tvb_get_ephemeral_string()
- Change some tvb_fake_unicode()+g_free()'s into tvb_get_ephemeral_faked_unicode()
- Change some tvb_get_string() calls that were clearly memory leaks (like
  atoi(tvb_get_string(...))) into tvb_get_ephemeral_string()

svn path=/trunk/; revision=22515
2007-08-15 22:27:52 +00:00
Ronnie Sahlberg 2d1bb39121 change the signature for the get_pdu_len() function pointer passed to tcp_dissect_pdus() to also include a packet_info pointer.
there are many reasons why some protocols actually need to be able to access the pinfo structure while determining the pdu size



svn path=/trunk/; revision=19751
2006-10-31 09:29:07 +00:00
Gerald Combs 44318bc1f1 Check to see if we've passed a null strval to ndps_string().
Should fix the recent fuzz bugs.

svn path=/trunk/; revision=19506
2006-10-12 15:00:07 +00:00
Guy Harris 69ab0c473b Use a different heuristic to determine whether an NDPS string is ASCII
or Unicode, and use tvb_get_ephemeral_faked_unicode() to get Unicode
strings; this fixes problems I've seen in captures, where the string
isn't being processed correctly.

svn path=/trunk/; revision=19494
2006-10-11 17:01:51 +00:00
Ronnie Sahlberg a003f7cd8f fix two of iljas bugs
svn path=/trunk/; revision=18710
2006-07-11 03:19:15 +00:00
Gerald Combs bbc5a76517 Fix more bugs found by Ilja van Sprundel.
packet-mount.c:
  Don't allocate a huge amount of memory.

packet-ntp.c:
  Fix a possible format string bug.

packet-ndps.c:
packet-nmas.c:
  Fix an off-by-one buffer error.

svn path=/trunk/; revision=18678
2006-07-07 04:01:09 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Ronnie Sahlberg f331077a60 waste a couple of bytes per tcp conversation and make the tree for acked_packets (i.e. packets that have interesting tcp properties such as being retransmissions etc) hang off the per conversation tcpd struct instead of being global.
while this should improve performance by unmeasurably little it does have the sideeffect that once we finish the rewrite   tcp analysis might actually work and work well even for tcp over tcp tunnelling. 

this also means that if you include packet-tcp.h   you also need to include emem.h .




svn path=/trunk/; revision=17681
2006-03-20 10:52:53 +00:00
Jaap Keuter 846f069180 This patch fixes a couple of bind replies to report proper session id.
Greg Morris


svn path=/trunk/; revision=17000
2006-01-11 11:35:25 +00:00
Anders Broman 81fb46aacd From Greg Morris:
Fixes proper decoding of extended error 2 values
Also adds a number of additional error codes/values

svn path=/trunk/; revision=16572
2005-11-23 21:25:24 +00:00
Guy Harris f3144c4fef Clean up "print_address()" - fix the indentation, do the check for a
too-large address in common code, and *don't* use tvb_get_letohl() to
get IPv4 addresses (just use proto_tree_add_item(), it works Just Fine).

For integral values, always do the tvb_ensure_bytes_exist() test; don't
just do it if the length is the expected value (the real problem is with
bogus too-large lengths, so it's more important to do the check if the
length *isn't* the expected value!).  Fixes bug 549.

svn path=/trunk/; revision=16298
2005-10-25 00:28:40 +00:00
Gilbert Ramirez c31e002512 From Greg Morris:
Adds expert data to the NDPS dissector


svn path=/trunk/; revision=16267
2005-10-19 14:32:05 +00:00
Ronnie Sahlberg 05dbe84db8 gmemchunk -> se_alloc() improvements
svn path=/trunk/; revision=15326
2005-08-12 23:57:01 +00:00
Jörg Mayer a0f94c125f Last set of trivial fixes for "no previous declaration" warnings.
svn path=/trunk/; revision=15191
2005-08-02 08:30:33 +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
Ulf Lamping 56a9fe6d2a add a generated toplevel line between the connectionless DCE/RPC protocol and the defragmented DCE/RPC content, to better understand what's going on if defragmentation is done.
svn path=/trunk/; revision=14531
2005-06-02 20:55:58 +00:00
Ulf Lamping d3f821035b fix #223: add another tvb_ensure_bytes_exist() call
svn path=/trunk/; revision=14528
2005-06-02 19:31:16 +00:00
Ulf Lamping f3037e2f53 add two more tvb_ensure_bytes_exist() calls to fix #216
When I look at the remaining code, I fear this will become a never ending story :-(

svn path=/trunk/; revision=14481
2005-05-30 02:58:13 +00:00
Ulf Lamping f8b3fe7668 add some tvb_ensure_bytes_exist() calls, fixes #197, #202 and #208
svn path=/trunk/; revision=14465
2005-05-28 12:49:19 +00:00
Gerald Combs bf48f8e4d4 Check for a few more integer overflows. Found during fuzz testing.
svn path=/trunk/; revision=14266
2005-05-02 14:12:42 +00:00
Gerald Combs a416a4b6f5 Check for an integer overflow. Fixes bug 149.
svn path=/trunk/; revision=14245
2005-04-30 16:42:04 +00:00
Ronnie Sahlberg f229ab5733 fix for bug 107 from Greg Morris
svn path=/trunk/; revision=14199
2005-04-27 10:21:12 +00:00
Gerald Combs 380dfa0fde Add a bunch of tvb_ensure_bytes_exist() calls. Fixes bug 106.
svn path=/trunk/; revision=14194
2005-04-26 22:19:38 +00:00
Gerald Combs 78a09d190b Fix another invalid item length. Fixes bug 98.
svn path=/trunk/; revision=14184
2005-04-25 15:28:32 +00:00
Gerald Combs a9e9262981 Don't try to tell proto_tree_add_item() that FT_UINT32s are something other
than 4 bytes.  It throws a fit when you do that.  Fixes bug 97.

svn path=/trunk/; revision=14183
2005-04-25 15:21:37 +00:00
Gerald Combs cf23c92003 Make sure we don't exhaust system memory.
svn path=/trunk/; revision=14172
2005-04-23 20:54:59 +00:00
Lars Roland ec9ca01616 Move the following files from /trunk to /trunk/epan:
asn1.[ch]
follow.[ch]
ptvcursor.[ch]
reassemble.[ch]
xmlstub.[ch]

fix #include statements accordingly.

svn path=/trunk/; revision=13366
2005-02-09 23:38:00 +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 bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Ulf Lamping d530bd4e14 Prevent the word "desegmentation" at the GUI, but use reassembling at that places, as we also use "defragmentation" and "reassembling". Use reassembling as the general term for such actions.
I (hopefully) didn't changed any protocol fields or preference file names, but only the GUI labels appearing in the protocol display and the protocol preferences.

Also added a note to the protocol preferences (where appropriate), that you have to enable "Allow subdissectors to reassemble TCP streams" at the corresponding protocol settings for TCP reassembling to take effect.

If you encounter any mistakes I've made here, please let me know...

svn path=/trunk/; revision=11784
2004-08-21 09:02:52 +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