aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ms-mms.c
AgeCommit message (Collapse)AuthorFilesLines
2014-09-29Add editor modelines and adjust indentation as needed.Bill Meier1-0/+12
Change-Id: Id57d264299f2026d703c5b08bace4b24b32f184c Reviewed-on: https://code.wireshark.org/review/4371 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-06ms-mms: fix retval for short pkts, fix reading flagsPeter Wu1-7/+5
uint16 & 0xFF00 will always equal 0. Use tvb_get_guint8 instead. Convert from tvb_length to tvb_captured_length. Fix the return value of dissectors, 0 means reject but that cannot be combined with reassembly requests. Change-Id: I5fca66e2e809699392237aff5813eecdfb15857f Reviewed-on: https://code.wireshark.org/review/2885 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-1/+1
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-1/+1
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-1/+1
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 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>
2013-12-16Use proto_tree_add_item() in preference to fetching the string andGuy Harris1-4/+10
adding it with proto_tree_add_string(). Use tvb_get_string_enc() rather than tvb_get_unicode_string() to fetch strings. We assume a UTF-16 encoding for all "Unicode" strings. Use tvb_strsize() and tvb_unicode_strsize() to get the lengths of null-terminated strings. Get rid of unused ett_nt_unicode_string variable. svn path=/trunk/; revision=54158
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53230
2013-09-22emem -> wmem conversion:Pascal Quantin1-5/+5
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits() - tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup() - tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode() - tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string() - tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string() - tvb_get_ephemeral_string_enc() -> tvb_get_string_enc() - update docs accordingly svn path=/trunk/; revision=52172
2013-04-18Let proto_tree_add_item() do the length checking for string lengths, soGuy Harris1-64/+51
we thrown an exception if the lengths are too long. For UCS-2/UTF-16 strings, do an extra length check to avoid overflows, but throw ReportedBoundsError if the check fails, so we report them the same way we report other too-large length errors. Just use proto_tree_add_item() to put UCS-2/UTF-16 strings (assumed to be UTF-16, not UCS-2; is that correct?) into the protocol tree. svn path=/trunk/; revision=48913
2013-03-29Rename value string (and similar) functions to use a consistent pattern. ThisEvan Huus1-1/+1
was done using textual search+replace, not anything syntax-aware, so presumably it got most comments as well (except where there were typos). Use a consistent coding style, and make proper use of the WS_DLL_* defines. Group the functions appropriately in the header. I ended up getting rid of most of the explanatory comments since many of them duplicated what was in the value_string.c file (and were out of sync with the recent updates I made to those in r48633). Presumably most of the comments should be in the .h file not the .c file, but there's enough churn ahead that it's not worth fixing yet. Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467 svn path=/trunk/; revision=48634
2013-03-01Revert r47839, it is not needed with r47979.Evan Huus1-1/+1
svn path=/trunk/; revision=47980
2013-03-01Add a much better workaround for bug #8382 and some expert info.Evan Huus1-4/+22
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8382 svn path=/trunk/; revision=47979
2013-02-23Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8382Evan Huus1-1/+1
Don't pass a length longer than the strlen of the string into format_text(). This can happen if the length we ask for from the tvb overflows, for example. svn path=/trunk/; revision=47839
2013-01-31Use '#if 0 ... #endif' rather than /** ... **/ to comment outBill Meier1-2/+2
unused hf[] entries (which I should have done in the first place). svn path=/trunk/; revision=47391
2013-01-26Fix various instances of unused hf[] entries foundBill Meier1-1/+3
by checkhf. svn path=/trunk/; revision=47312
2012-12-22revert r46678Martin Kaiser1-2/+1
now that tvb_get_ephemeral_unicode_string() throws an exception for invalid length parameters, there's no point in doing an explicit check beforehand (when I added the check, there were many places that I missed) svn path=/trunk/; revision=46707
2012-12-21fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8112Martin Kaiser1-1/+2
by adding a range to the length that is passed to tvb_get_ephemeral_unicode_string() svn path=/trunk/; revision=46678
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-3/+1
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-08-10Use val_to_str_const() where appropriate;Bill Meier1-19/+19
Also (for a few files): - create/use some extended value strings; - remove unneeded #include files; - remove unneeded variable initialization; - re-order fcns slightly so prefs_reg_handoff...() at end, etc svn path=/trunk/; revision=44438
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-04-28Remove move unread updates to 'offset' to avoid clang warnings.Martin Mathieson1-28/+4
svn path=/trunk/; revision=42315
2012-03-31Fix off by one shift errors introduced in r39530 where it seemed proper[1]Jakub Zawadzki1-8/+8
[1] I'm unsure of packet-dtpt, so I haven't patch it. svn path=/trunk/; revision=41873
2011-10-23Replace use of tvb_get_ephemeral_faked_unicode() by use of ↵Bill Meier1-8/+8
tvb_get_ephemeral_unicode_string(); Fix encoding arg as needed. svn path=/trunk/; revision=39530
2011-10-23Fix a few proto_tree_add_item() encoding args.Bill Meier1-1/+1
svn path=/trunk/; revision=39514
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-3/+3
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵Bill Meier1-2/+2
FT_STRINGZ, FT_UINT_STRING as follows: 1. If there's no character encoding (ENC_ASCII, ...) specified then use ENC_ASCII. 2. For all but FT_UINT_STRING, always use ENC_NA (replacing any existing True/1/FALSE/0 /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN). svn path=/trunk/; revision=39426
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-66/+66
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-2/+2
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-19Fix Visual C++ code analysis warnings.Gerald Combs1-1/+1
svn path=/trunk/; revision=36007
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-2/+2
keys to have _uint in their names, to match the routines that handle dissector tables with string keys. (Using _port can confuse people into thinking they're intended solely for use with TCP/UDP/etc. ports when, in fact, they work better for things such as Ethernet types, where the binding of particular values to particular protocols are a lot stronger.) svn path=/trunk/; revision=35224
2010-09-15Remove a few more calls to check_col()Martin Mathieson1-39/+18
svn path=/trunk/; revision=34124
2009-08-09Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-20/+5
svn path=/trunk/; revision=29345
2009-05-26Misc dissector cleanup:Bill Meier1-79/+79
- Make some fcns & vars static - hf[] blurbs: "" and repeated text --> NULL - Move proto_register & proto_reg_handoff to end of source - packet-catapult-dct2000: simplify proto_reg_handoff - Use consistent indentation svn path=/trunk/; revision=28488
2009-01-08Fix for bug 2902:Jaap Keuter1-1/+1
Make sure to check the right column before writing to it, and vice versa. svn path=/trunk/; revision=27191
2008-09-30Minor proto_reg_handoff cleanup: use find_dissector when appropriate.Bill Meier1-2/+1
svn path=/trunk/; revision=26308
2008-06-11Return 0 if we don't dissect any bytes.Stig Bjørlykke1-6/+6
Set desegment_len = DESEGMENT_ONE_MORE_SEGMENT. svn path=/trunk/; revision=25443
2007-12-05Make the "protocol" field big enough to hold the 3-characterGuy Harris1-1/+1
null-terminated string that the format item used when scanning says it is - i.e., 4 "char"s, including the null terminator. (Thanks and a tip of the hat to "gcc (GCC) 3.3.5 (propolice)" on OpenBSD 4.2 for finding this.) svn path=/trunk/; revision=23761
2007-10-23Apply the small performance enhancment patches for:Anders Broman1-2/+2
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster. Replace - col_append_fstr() with faster col_append_str() - col_add_str() with col_set_str() when it's safe svn path=/trunk/; revision=23252
2006-08-01Fix some fussy warnings seen on the Ubuntu buildbot logsMartin Mathieson1-6/+9
svn path=/trunk/; revision=18811
2006-05-21change a whole bunch of ethereal into wiresharkRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18196
2006-04-02From Martin Mathieson:Anders Broman1-58/+5
Removes the use of the deprecated proto_tree_add_item_hidden() function I was adding the 'msmms.command.unknown' field in lots of places (a habit of mine in my own dissectors), but this probably isn't useful. svn path=/trunk/; revision=17782
2005-08-10convert some tvb_fake_unicode() to tvb_get_ephemeral_faked_unicode()Ronnie Sahlberg1-33/+8
svn path=/trunk/; revision=15272
2005-08-10rename ep_tvb_get_string() to tvb_get_ephemeral_string() asnd update the ↵Ronnie Sahlberg1-1/+1
documentation in README.developer svn path=/trunk/; revision=15270
2005-08-06Don't assign "" to a string that's only used after it's assigned to.Guy Harris1-71/+50
"tvb_fake_unicode()" never returns a null pointer, so there's no need to check for it; there's also no need to check that it's not an empty string before freeing it, as it's always assigned a g_malloc()ed string. It also takes as an argument the number of Unicode characters in the string, not the number of bytes in the string. Use "format_text()" when adding a string to the Info column, in case it has non-printable characters. Don't use "proto_tree_add_string_format()" if you don't have to. svn path=/trunk/; revision=15239
2005-08-04Albert Chin:Jörg Mayer1-3/+10
uses of some C99'isms which prevent compilation on IRIX 6.5 with the SGI C compiler. svn path=/trunk/; revision=15210
2005-07-31From Martin Mathieson:Anders Broman1-51/+297
This update: - adds more command parameter details - doesn't clutter the tree with unknown fields svn path=/trunk/; revision=15159
2005-07-30More char -> const char fixesJörg Mayer1-6/+6
Declare some functions static svn path=/trunk/; revision=15158
2005-07-28ememify some more calls to tvb_get_string()Ronnie Sahlberg1-1/+1
this fixes an obvious memleak in ms-mms svn path=/trunk/; revision=15132