Pascal Quantin
a0c53ffaa1
emem -> wmem conversion:
...
- 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-09-22 15:50:55 +00:00
Jörg Mayer
72f8ca4895
One of the wmem patches only updated the generated packet-snmp.c
...
but not the source. Fix that.
svn path=/trunk/; revision=52123
2013-09-17 18:54:18 +00:00
Michael Mann
00dd0adc0d
expert_add_info_format_text -> expert_add_info_format
...
svn path=/trunk/; revision=51851
2013-09-09 00:28:48 +00:00
Pascal Quantin
02cae558f9
Do not use ephemeral memory when adding a new data source
...
svn path=/trunk/; revision=51424
2013-08-19 11:11:11 +00:00
Jeff Morriss
2df54da6e2
Move a bunch of the crypt modules and pint.h into wsutil.
...
This means wsutil now links against libcrypt.
Protect a bunch of the crypt header files from multiple inclusion.
svn path=/trunk/; revision=51100
2013-08-01 23:34:47 +00:00
Jeff Morriss
54bb2e7a5c
Move report_err.{h,c} from epan into wsutil: there's nothing epan-specific there and moving it avoids having to recompile the file for use in editcap and capinfos (which don't link against libwireshark).
...
svn path=/trunk/; revision=50598
2013-07-15 02:48:26 +00:00
Evan Huus
d63bd5330f
Back out some of the wmem conversions (r50063 and r50057).
...
These dissectors allocate ephemeral or seasonal memory in UAT callbacks, which
really makes no sense because UAT callbacks can occur when there is no packet or
file in scope, making this effectively a leak if the user is fiddling with their
UAT and never opens a capture.
Emem let you get away with this, wmem forces an assertion. Back out the changes
so that the UATs are usable until the code can be properly fixed to not use
out-of-scope allocators.
svn path=/trunk/; revision=50073
2013-06-20 06:26:03 +00:00
Evan Huus
b1e12ec925
Convert the rest of the ASN1 dissectors from emem to wmem.
...
svn path=/trunk/; revision=50063
2013-06-19 22:47:36 +00:00
Jörg Mayer
b77119aca7
Remove traling whitespace.
...
svn path=/trunk/; revision=50048
2013-06-19 18:33:49 +00:00
Anders Broman
82e220f2bd
Pretify dissection of date and Time.
...
svn path=/trunk/; revision=49905
2013-06-12 15:08:08 +00:00
Anders Broman
03a322661f
Fix a crash when oid_info->value_typem is NULL
...
svn path=/trunk/; revision=49894
2013-06-12 04:21:40 +00:00
Anders Broman
bbb5aacd42
Show DisplayString as a string.
...
svn path=/trunk/; revision=49887
2013-06-11 16:35:06 +00:00
Anders Broman
3bfeaff546
Add subdissection of:
...
- SNMPv2-MIB sysDescr
- SNMPv2-MIB::sysName
svn path=/trunk/; revision=49774
2013-06-04 20:05:16 +00:00
Michael Mann
7fe5422c4b
Convert ASN.1 dissectors to use filterable expert info.
...
NOTE: Kerberos ASN.1 template was updated, but not generated to source.
svn path=/trunk/; revision=49707
2013-06-03 03:42:36 +00:00
Michael Mann
195e87f3ea
Protect a "divide by zero" operation. Bug 7359 ( https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7359 ). This seems to have been generated through a corrupted UAT file switching between 1.8 and 1.10, but it's a good check to have regardless.
...
svn path=/trunk/; revision=49128
2013-05-01 23:59:16 +00:00
Bill Meier
371d2dc915
From beroset:
...
remove C++ incompatibilities
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10401
svn path=/trunk/; revision=48441
2013-03-20 14:50:20 +00:00
Anders Broman
f92bd64966
[-Wmissing-prototypes]
...
Use explicit casts.
svn path=/trunk/; revision=48439
2013-03-20 05:59:22 +00:00
Anders Broman
d0efafbcb1
From beroset:
...
remove C++ incompatibilities from UAT_VS_DEF macro and all uses
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416
svn path=/trunk/; revision=48259
2013-03-12 06:40:13 +00:00
Michael Mann
8c0d526f58
SNMP dissector should handle aes256 (better version than r47690)
...
svn path=/trunk/; revision=47902
2013-02-26 11:38:39 +00:00
Martin Kaiser
38a73a32f3
include the wsutil/wsgcrypt.h instead of including gcrypt.h directly
...
svn path=/trunk/; revision=47802
2013-02-21 18:23:29 +00:00
Pascal Quantin
9dc510fc8e
Fix typo error
...
svn path=/trunk/; revision=47693
2013-02-16 13:55:10 +00:00
Michael Mann
46dbc91896
Add decryption algorithm preference to SNMP dissector.
...
Bug 8328 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8328 )
svn path=/trunk/; revision=47690
2013-02-16 02:10:50 +00:00
Michael Mann
8ad4ccb850
Allow SNMP user table entry to be re-editted even if engineID/Username remains the same.
...
Bug 2426 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2426 )
svn path=/trunk/; revision=47328
2013-01-28 21:08:14 +00:00
Graham Bloice
cf4fcaa8b6
snmp dissector did not correctly set length of pdu's of more than 127 bytes. The dissector assumed the ber identifier and length fields were always 2 bytes long, so a pdu length of more than 127 bytes, which requires more than 1 length octet, was incorrectly dissected.
...
svn path=/trunk/; revision=47173
2013-01-20 10:01:34 +00:00
Anders Broman
eb618abad9
From Bill Parker:
...
Explicitly declare/cast 'unsigned <variable>' as 'unsigned int <variable>'
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7810
svn path=/trunk/; revision=45418
2012-10-09 08:40:02 +00:00
Jeff Morriss
3551a86c36
We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
...
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Jakub Zawadzki
5a8783f5b1
Initial commit to support yet another method of passing data between dissectors.
...
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL
svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Jakub Zawadzki
0176a135db
Propage changes done in generated dissectors to asn1/
...
svn path=/trunk/; revision=44845
2012-09-10 15:24:00 +00:00
Chris Maynard
c38a247faa
Fix Coverity CID 280019 (formerly 19): "Logically dead code" that abroman previously commited a fix for in r17532, but forgot to also commit a change to asn1/snmp/packet-snmp-template.c as well, so the change was apparently inadvertently reverted the next time that packet-snmp.c was regenerated.
...
svn path=/trunk/; revision=44179
2012-08-01 02:08:29 +00:00
Chris Maynard
4d180fbe32
tvb_length_remaining() can return -1, so don't assign its return value to an unsigned integer. Fixes Coverity CID's 280233 and 280234.
...
svn path=/trunk/; revision=43697
2012-07-13 20:47:08 +00:00
Pascal Quantin
1410207421
Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7438 :
...
Do not call tvb_ensure_length_remaining on an empty tvb
svn path=/trunk/; revision=43648
2012-07-10 15:43:03 +00:00
Guy Harris
659cf0527a
UATs could be put into "categories". The categories were defined only
...
implicitly by the #define name and string they were defined to; not all
UATs neatly fit into any of the categories, so some of them were put
into categories that weren't obviously correct for them, and one - the
display filter macro UAT - wasn't put into any category at all (which
caused crashes when editing them, as the GUI code that handled UAT
changes from a dialog assumed the category field was non-null).
The category was, in practice, used only to decide, in the
aforementioned GUI code, whether the packet summary pane needed to be
updated or not. It also offered no option of "don't update the packet
summary pane *and* don't redissect anything", which is what would be
appropriate for the display filter macro UAT.
Replace the category with a set of fields indicating what the UAT
affects; we currently offer "dissection", which applies to most UATs
(any UAT in libwireshark presumably affects dissection at a minimum) and
"the set of named fields that exist". Changing any UAT that affects
dissection requires a redissection; changing any UAT that affects the
set of named fields that exist requires a redissection *and* rebuilding
the packet summary pane.
Perhaps we also need "filtering", so that if you change a display filter
macro, we re-filter, in case the display is currently filtered with a
display filter that uses a macro that changed.
svn path=/trunk/; revision=43603
2012-07-08 01:00:46 +00:00
Jakub Zawadzki
bf81b42e1e
Update Free Software Foundation address.
...
(COPYING will be updated in next commit)
svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Chris Maynard
951b5b9c54
Do not use BASE_NONE for FT_*INT* types.
...
svn path=/trunk/; revision=43179
2012-06-09 17:56:08 +00:00
Anders Broman
2a30b1eff9
Get rid of a couple of warnings.
...
svn path=/trunk/; revision=43065
2012-06-04 13:21:44 +00:00
Chris Maynard
0c49176411
tvb_length_remaining() can return a negative number, so be sure to handle it. Fixes Coverity CID's 280233-280235.
...
svn path=/trunk/; revision=42839
2012-05-24 23:35:23 +00:00
Jakub Zawadzki
c09a95a0e3
Fix bug #7283
...
When Engine ID is 128 we should only break when we know the enterprise id.
svn path=/trunk/; revision=42825
2012-05-24 12:26:34 +00:00
pascal
1cd8ca08a6
From Evan Huus:
...
Fix Integer32 length field detection
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7192
svn path=/trunk/; revision=42241
2012-04-25 20:20:23 +00:00
Chris Maynard
86cbd0b559
#include <epan/crypt/crypt-*.h> => #include <epan/crypt/*.h>
...
svn path=/trunk/; revision=40570
2012-01-18 21:20:50 +00:00
Anders Broman
42b44648c8
Get rid of Warnings.
...
svn path=/trunk/; revision=39954
2011-11-20 08:59:19 +00:00
Guy Harris
bbed650915
Do some more length checking to avoid a dissector bug error. Should fix
...
bug 6564.
svn path=/trunk/; revision=39831
2011-11-14 18:42:11 +00:00
Stig Bjørlykke
be353072dc
Added support for big integer64 values.
...
This fixes bug 6295.
svn path=/trunk/; revision=39666
2011-10-29 18:26:57 +00:00
Bill Meier
794757ae8f
For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
...
Also: remove trailing whitespace for a number of files.
svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier
54716c768a
Use ENC_NA as proto_tree_add_item() encoding arg for FT_ETHER hf[] field type.
...
svn path=/trunk/; revision=39491
2011-10-20 14:36:14 +00:00
Bill Meier
31abdcb584
Convert asn1 template files proto_tree_add_item() 'encoding' arg for field types FT_STRING as follows:
...
1. If there's no character encoding (ENC_ASCII, ...) specified
then use ENC_ASCII.
2. Always use ENC_NA
(replacing any existing True/1/FALSE/0
/ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).
svn path=/trunk/; revision=39428
2011-10-15 19:48:19 +00:00
Bill Meier
6142dd287b
Convert 'encoding' parameter of certain proto_tree_add_item() calls in asn1/*:
...
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_BOOLEAN
FT_IPv4
FT_EUI64
FT_GUID
FT_UINT_STRING
Also: For type FT_IPv6 use ENC_NA. (This was missed in SVN #39260 )
svn path=/trunk/; revision=39332
2011-10-10 01:38:20 +00:00
Bill Meier
e18e2694c6
Use ENC_NA as encoding for proto_tree_add_item() calls which directly 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|1|0|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN
svn path=/trunk/; revision=39263
2011-10-05 02:39:04 +00:00
Chris Maynard
b25c098e0c
From Paul Stath via bug 5731: The check for engineID length should only occur if the engineID has a non-zero length.
...
Reference: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5731
svn path=/trunk/; revision=38303
2011-08-02 01:54:03 +00:00
Stig Bjørlykke
f282154ab0
Use correct encoding for proto_tree_add_item().
...
svn path=/trunk/; revision=38107
2011-07-19 10:51:12 +00:00
Anders Broman
2477298026
From Sean Van Gorder:
...
When Wireshark attempts to read an SNMP packet with a variable-bindings item
with an OID containing an index string which includes an entry of type
"Unsigned32", Wireshark will stop dissecting the packet at this index entry and
end with the error:
[Dissector bug, protocol SNMP: proto.c:2761: failed assertion
"DISSECTOR_ASSERT_NOT_REACHED"]
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5883
svn path=/trunk/; revision=37558
2011-06-05 20:12:44 +00:00