aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mount.c
AgeCommit message (Collapse)AuthorFilesLines
2016-06-15mount: fix a memory leakMartin Kaiser1-18/+21
don't copy the wmem-buffer from address_to_str() into a g_malloc()ed one that is never freed instead, realloc the wmem-buffer and add the nfs path to it (nfs_name_snoop_add_name() will make a copy internally) Change-Id: I4274a4a413c09f3f1d78beba65d94748ce185413 Reviewed-on: https://code.wireshark.org/review/15902 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-14mount: don't THROW() an exception from a dissectorMartin Kaiser1-13/+12
if the length is too large, we can simply skip nfs_name_snoop_add_name() and the code to prepare its input Change-Id: I30c9a89edf7b48c45b52e7dad099ac4151f7f4a7 Reviewed-on: https://code.wireshark.org/review/15883 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-08Fix a lot of typos and misspellingsmoshekaplan1-1/+1
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3 Reviewed-on: https://code.wireshark.org/review/13069 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-21Do all the work of registering an ONC RPC-based protocol in rpc_init_prog().Guy Harris1-8/+15
Hand it a table of version/procedure table/hf-for-program-number triplets. Change-Id: I2acc03c2da83353165bd422d8537362201c814e2 Reviewed-on: https://code.wireshark.org/review/9740 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-19Require dissectors for all ONC RPC calls and replies.Guy Harris1-25/+28
Either there's a known body for the call or reply, in which case we already have a dissector for it, or the body is empty, in which case we now have dissect_rpc_void() to dissect it, or the body is unknown or nobody's bothered writing it, in which case we use dissect_rpc_unknown() for now. This means that an attempt to look up the dissector for a known procedure will always succeed, so we can label it with the name rather than with "proc-N". It also means that we distinguish between "it's void" and "it's unknown", so that unknown values will get flagged as such. Change-Id: I748580c1dca61d1f0972396db1a3b0885fc0a541 Reviewed-on: https://code.wireshark.org/review/9699 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-02Have RPC dissector use real dissector tables for its subdissectors instead ↵Michael Mann1-4/+4
of a "homegrown" method. Change-Id: I06d7d4e9747ed8593cf40506cae3a09ae237846b Reviewed-on: https://code.wireshark.org/review/9456 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-02Replace RPC "dissect_function_t" function signature with "new style" ↵Michael Mann1-20/+16
dissector function signature. This paves the way for using dissector tables. Change-Id: I88ac165ef9aa5bf5c05e1115f7321e18e734d683 Reviewed-on: https://code.wireshark.org/review/9453 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-31mount: fix Copy-paste error (CID 1224605)Alexis La Goutte1-5/+3
Don't longer need to check if(tree) Change-Id: I4ec572df28bad3c487c3c744840d97b79781feb3 Reviewed-on: https://code.wireshark.org/review/6164 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-26Replace ip_to_str with [ep_]address_to_str and tvb_ip_to_str.Michael Mann1-1/+1
Change-Id: I40d0c8253743183aecef252040b7dd6742ae5c71 Reviewed-on: https://code.wireshark.org/review/5934 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-23Deleting unnecessary #includes from dissectors.Martin Mathieson1-2/+0
Fourth batch (packet-mac-lte.c -> packet-rtp.c). Will look at cleaning up and committing script afterwards. Change-Id: Id921f07f4b274f0cfb77ce81abe4a285fdb8b644 Reviewed-on: https://code.wireshark.org/review/6023 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-01Use proto_tree_add_bitmask for groups of proto_tree_add_boolean.Michael Mann1-119/+54
Part 2 of many Change-Id: I50815e7738b011382392f3078a7107d3d9eec4ec Reviewed-on: https://code.wireshark.org/review/5542 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-03Add editor modelines; Adjust whitespace as needed.Bill Meier1-97/+110
Change-Id: I391cdf80a6e4ae5b0f4068e0500a90d013588f8a Reviewed-on: https://code.wireshark.org/review/4442 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-04convert to proto_tree_add_subtree[_format]Michael Mann1-9/+6
Change-Id: I621f2e2cad9403449cb78f45302388f0c874d3bc Reviewed-on: https://code.wireshark.org/review/2852 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-03-16NFS: We need to pass data through to the dissect_rpc_list() callbackRonnie Sahlberg1-4/+8
Change-Id: Iace7c6dfb81f0a98bbae304346906a5e82c82812 Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Reviewed-on: https://code.wireshark.org/review/679 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-01-14Don't cast away constness.Guy Harris1-1/+1
svn path=/trunk/; revision=54761
2013-12-14Fix warningsJakub Zawadzki1-1/+2
svn path=/trunk/; revision=54089
2013-11-10Have rpc_call_info_value be passed through to (sub)dissectors instead of ↵Michael Mann1-8/+8
using pinfo->private_data. This was acheived by adding a void* data parameter to the dissect_function_t typedef in packet-rpc.h (r53213). After converting the pinfo->private_data, I'm not sure if it would be better to change the void* data pointer to be a rpc_call_info_value* explicitly. Not all "dissector functions" use it, but it would certainly save a lot of casting... svn path=/trunk/; revision=53232
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=53230
2013-11-10Add data parameter to dissect_function_t in vsff structure. The intention ↵Michael Mann1-16/+14
here is to use it to replace some pinfo->private_data. I didn't realize how expansive this change would be, so committing it now before replacing the pinfo->private_data, so if something needs to be reverted, all of this is not lost. svn path=/trunk/; revision=53213
2013-11-09Include <epan/to_str.h> only when needed.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53189
2013-06-14Removed check_col() and the occasional tree.Michael Mann1-10/+3
svn path=/trunk/; revision=49938
2013-04-19From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8581Evan Huus1-1/+1
Major NFS dissector cleanup. Consistent naming, spacing, line wrapping, variable initialization, ... For full details see comment #18 of the bug. svn path=/trunk/; revision=48934
2013-03-19From beroset:Anders Broman1-3/+3
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48425
2013-02-15From Alyssa Milburn via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8335Evan Huus1-1/+1
Make length field unsigned so that negative values fail the bounds check and throw a regular exception before getting passed to glib (where they cause a program-ending assert failure instead). svn path=/trunk/; revision=47672
2012-12-26Fix a bunch of warnings.Guy Harris1-5/+5
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45017
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-2/+2
non-autogenerated epan/dissectors: Specifically: Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as the encoding parameter for proto_tree_add_item() calls which directly reference an item in hf[] which has a type of: FT_UINT8 FT_UINT16 FT_UINT24 FT_UINT32 FT_UINT64 FT_INT8 FT_INT16 FT_INT24 FT_INT32 FT_INT64 FT_FLOAT FT_DOUBLE svn path=/trunk/; revision=39288
2011-10-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-4/+4
reference an hf item (in hf[] with types: FT_NONE FT_BYTES FT_IPV6 FT_IPXNET FT_OID Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN svn path=/trunk/; revision=39260
2011-02-17Fix some Visual C++ static analyzer complaints.Gerald Combs1-1/+1
svn path=/trunk/; revision=35971
2011-01-16There's no need to pass the result of tvb_get_ptr() as the 'value' inJeff Morriss1-15/+11
proto_tree_add_*(): just use proto_tree_add_item(). Replace some tvb_get_ptr()s with tvb_get_ephemeral_string() or tvb_get_const_stringz(). Use tvb_memeql() & tvb_memcmp(). svn path=/trunk/; revision=35558
2010-09-24(Refining the regexp...) Replace blurbs that match the name (case ↵Jeff Morriss1-1/+1
insensitive) with NULL. svn path=/trunk/; revision=34230
2009-11-09Removed some unused variables.Stig Bjørlykke1-6/+2
svn path=/trunk/; revision=30902
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-48/+48
(1) Trailing/leading spaces are removed from 'name's/'blurb's (2) Duplicate 'blurb's are replaced with NULL (3) Empty ("") 'blurb's are replaced with NULL (4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME, FT_PROTOCOL, FT_STRING and FT_STRINGZ field types (5) Only allow non-zero value for 'display' if 'bitmask' is non-zero svn path=/trunk/; revision=28770
2009-05-01From Reinhard Speyerer:Jaap Keuter1-1/+1
This patch fixes several misspellings/typos in Wireshark SVN revision 28201. svn path=/trunk/; revision=28216
2009-03-29More size_t casts.Anders Broman1-1/+1
svn path=/trunk/; revision=27888
2008-08-26#include <emem.h> not req'dBill Meier1-1/+0
svn path=/trunk/; revision=26091
2008-06-25Constify a bunch of stuff, to squelch -Wwrite-strings warnings. Guy Harris1-1/+2
epan/dissectors/packet-ncp2222.inc is a bit hard to fix, so we're not ready to enable that warning by default yet. Throw in some casts to handle GLib routines that take arbitrary non-const pointers (they can later return the pointers, and some callers might want to modify or free up those pointers in cases where they're known to be writable or allocated). Use ep_tvb_memdup() rather than a combination of ep_alloc() and tvb_memcpy(). Clean up some indentation. svn path=/trunk/; revision=25601
2007-03-28Remove almost all of the casts I committed recently and in place ofStephen Fisher1-5/+5
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it. svn path=/trunk/; revision=21253
2007-03-27Fix some more warnings under gcc 4.0Stephen Fisher1-5/+5
svn path=/trunk/; revision=21237
2006-07-09In new_format_oid(), handle a zero-length OID.Gerald Combs1-1/+2
Fix a bug introduced recently in packet-rpc.c. Replace DISSECTOR_ASSERT() with THROW(ReportedBoundsError) in my recent checkins, since fuzz-test.sh sets WIRESHARK_ABORT_ON_DISSECTOR_BUG. svn path=/trunk/; revision=18693
2006-07-07add missing #include <epan/emem.h> to fix a related warningUlf Lamping1-0/+2
svn path=/trunk/; revision=18684
2006-07-07Fix more bugs found by Ilja van Sprundel.Gerald Combs1-2/+3
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-05-21change a whole bunch of ethereal into wiresharkRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18196
2005-10-27get rid of some strcpyRonnie Sahlberg1-1/+1
svn path=/trunk/; revision=16340
2005-10-03prettify mount,Ronnie Sahlberg1-18/+33
if MNT fails with an error, put the error string in the INFO column svn path=/trunk/; revision=16076
2005-08-16prettify MNT (and friends) by placing the path in COL_INFORonnie Sahlberg1-3/+6
svn path=/trunk/; revision=15373
2005-07-23we no longer need to g_free() teh string returned by dissect_rpc_string.Ronnie Sahlberg1-5/+0
when checking the calls in packet-ndmp.c we must have had a memleak there since it never freed those strings. svn path=/trunk/; revision=15005
2004-07-18Move dissectors to epan/dissectors directory.Gilbert Ramirez1-0/+1109
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