Age | Commit message (Collapse) | Author | Files | Lines |
|
g_array_free(a, FALSE) returns "a->data". Callers that do not handle
this will leak memory. Convert other users to use the return value
instead of direct access to "a->data".
Change-Id: I0a29864e8106c0bf09e9573ef29e4474179c4171
Reviewed-on: https://code.wireshark.org/review/27438
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
|
|
DIAG_OFF_FLEX turns off all warnings that we want to disable for
Flex-generated code due to some versions of Flex generating code that
triggers those warnings.
DIAG_ON_FLEX restores those warnings, so we do the checks for code that
*we* wrote.
Use them in .l files.
Change-Id: I613a20309a30cd4c61111a1edbe27a5d05fcbf59
Reviewed-on: https://code.wireshark.org/review/25815
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
NULL checks were removed for following free functions:
- g_free "If mem is NULL it simply returns"
https://developer.gnome.org/glib/stable/glib-Memory-Allocation.html#g-free
- g_slist_free(_full)? "NULL is considered to be the empty list"
https://developer.gnome.org/glib/stable/glib-Singly-Linked-Lists.html
- g_strfreev "If str_array is NULL, this function simply returns."
https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strfreev
- g_slice_free "If mem is NULL, this macro does nothing."
https://developer.gnome.org/glib/stable/glib-Memory-Slices.html#g-slice-free
- g_match_info_free "not NULL... otherwise does nothing"
https://developer.gnome.org/glib/stable/glib-Perl-compatible-regular-expressions.html#g-match-info-free
- dfilter_free defined in Wireshark code. Returns early when passed NULL
epan/dfilter/dfilter.c
They were also removed around calls to g_strdup where applicable:
- g_strdup "If str is NULL it returns NULL."
https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strdup
Change-Id: Ie80c2db89bef531edc3aed7b7c9f654e1d654d04
Reviewed-on: https://code.wireshark.org/review/23406
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
|
|
Change-Id: Iace0462e6bb50573f3e4603f7a19e4b7ee1f9733
Reviewed-on: https://code.wireshark.org/review/23541
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
|
|
Bug: 13745
Change-Id: Ibd00ea4818eb4b47a2c46324c1bfc878fef03d1e
Reviewed-on: https://code.wireshark.org/review/22155
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
We now support dotted number values in the oid field.
Note that the attribute flags internal, array, concat, and virtual
aren't documented in the FreeRADIUS dictionary man page.
Change-Id: Iaf27845f75a93f2d006708224757ea48d8023cb1
Reviewed-on: https://code.wireshark.org/review/21853
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
Change-Id: I43efd124bc49bc3d1261bd690ce38c5debb94e45
Reviewed-on: https://code.wireshark.org/review/21852
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
Bug: 13176
Change-Id: I22cdce01d8e7d5b69c2013684a98a9a48acc0d13
Reviewed-on: https://code.wireshark.org/review/21727
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>
|
|
Since commit fdb5257f7cc8e19e6f8bcd35edee225cf44438a2 the ATTR_W_VENDOR
symbol was never matched, so remove it.
Change-Id: I5a56f48ce1995c23f9eca518308d3543a15ad049
Reviewed-on: https://code.wireshark.org/review/20313
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
Change-Id: I4b040665582ec1fd3f97b915b3819ff2d8850a6f
Reviewed-on: https://code.wireshark.org/review/20315
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
The same data is referenced by the ID-to-name and name-to-ID mapping, so
be make sure that the ID mapping is responsible (as the name mapping is
just used for duplicate detection and while parsing dictionary files).
Still to be done is fixing duplicate attribute numbers (by adding
support for OIDs and changing TLV attribute type IDs to OIDs) and fixing
duplicate attribute names (by prefixing the Vendor Names to them).
Also not handled is fixing Value memleaks.
Reproducers of the crash under ASAN:
tshark -G fields >/dev/null
tshark -r radius-ms-mppe-etrl-bug.cap (from bug 796)
Change-Id: Ifa4055901072bc830e19fe06937af67ce524a3be
Fixes: v2.3.0rc0-2536-gd4cf57100c ("Free radius dissector memory on shutdown")
Reviewed-on: https://code.wireshark.org/review/20307
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
|
|
The value_string was taken from the GArray and added to
radius_attr_info_t, but these were not properly freed.
Change-Id: I8de2b84760887c41229a57881ff46cedcef1d22f
Reviewed-on: https://code.wireshark.org/review/20311
Reviewed-by: Michael Mann <mmann78@netscape.net>
|
|
Change-Id: I19eef65e8144d7cb6d5c9eea454581a532420c75
Reviewed-on: https://code.wireshark.org/review/20292
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
|
|
Point to the FreeRADIUS man page for the dictionary file format, and
mention features we don't support - including features *not* documented
in the man page.
Change-Id: I08085062a6abcafb9dd0abe5b1edee53187ea23f
Reviewed-on: https://code.wireshark.org/review/19762
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
That way, if we #define anything for large file support, that's done
before we include any system header files that either depend on that
definition or that define it themselves if it's not already defined.
Change-Id: I9b07344151103be337899dead44d6960715d6813
Reviewed-on: https://code.wireshark.org/review/19035
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
Change-Id: I3f02227f9cda2ad4c878e2a736923919e10fbf25
Reviewed-on: https://code.wireshark.org/review/14802
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
master-branch libpcap now generates a reentrant Flex scanner and
Bison/Berkeley YACC parser for capture filter expressions, so it
requires versions of Flex and Bison/Berkeley YACC that support that.
We might as well do the same. For libwiretap, it means we could
actually have multiple K12 text or Ascend/Lucent text files open at the
same time. For libwireshark, it might not be as useful, as we only read
configuration files at startup (which should only happen once, in one
thread) or on demand (in which case, if we ever support multiple threads
running libwireshark, we'd need a mutex to ensure that only one file
reads it), but it's still the right thing to do.
We also require a version of Flex that can write out a header file, so
we change the runlex script to generate the header file ourselves. This
means we require a version of Flex new enough to support --header-file.
Clean up some other stuff encountered in the process.
Change-Id: Id23078c6acea549a52fc687779bb55d715b55c16
Reviewed-on: https://code.wireshark.org/review/14719
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
Tweak lemonflex-tail.inc to fix an issue this reveals.
It appears that, at least on the buildbots, the Visual Studio compiler
no longer issues warnings for the code generated with %option noyywrap.
Change-Id: Id64d56f1ae8a79d0336488a4a50518da1f511497
Reviewed-on: https://code.wireshark.org/review/12433
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
We don't have any Flex scanners that support an interactive command-line
interface, so none of our scanners are, or need to be, interactive.
Mark text2pcap's scanner as not interactive.
That means none of our scanners should call isatty(), so they don't have
any need to include <io.h> on Windows; remove that include from the
Lucent/Ascent text capture scanner.
Update a comment to reflect that what matters isn't whether we can read
from a terminal or whether we actually do so, what matters is whether
they read *interactively* from a terminal (if you want to run text2pcap
reading from the standard input and type at it, be my guest).
Change-Id: I59979d1fdb37e1913125a400963ff7a3fa6b9bbd
Reviewed-on: https://code.wireshark.org/review/11587
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
g_string_free(str, FALSE) frees the GString container but not the
underlying g_malloc()ed string; instead, it returns a pointer to the
g_malloc()ed string.
Fix those places that didn't already get the string pointer from
g_string_free() to do so rather than manually extracting the string
themselves.
And fix one place that didn't even need to use a string - it was just
scanning a C string without even modifying it.
Change-Id: Ibbf4872bf5b9935b9907f539b6edb1013f3053a5
Reviewed-on: https://code.wireshark.org/review/6532
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
Change-Id: I70ff250a905ac578d7e3afc63a82a5fcb3983608
Reviewed-on: https://code.wireshark.org/review/5269
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
For attributes, handle them the same way we handle duplicate vendors.
For TLVs, ignore duplicates; they shouldn't happen.
Change-Id: Ie968478c40a9b7848fa8ea25b144eda8656e5874
Reviewed-on: https://code.wireshark.org/review/5268
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
If, when adding a new vendor, we already find a vendor with the given
ID, don't bother adding it to the vendors-by-ID table with the same ID,
and, if and only if the vendor name has changed, remove it from the
vendors-by-name table, free the old name, replace it with the new name,
and, add it back to the vendors-by-name table with the new name.
Bug: 10666
Change-Id: I43ebcb57c742563157c71b01ebc0b35797a408e1
Reviewed-on: https://code.wireshark.org/review/5265
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
Change-Id: I487a3451344796447f0d5621b993cc89c29e93b5
Reviewed-on: https://code.wireshark.org/review/2383
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
|
|
svn path=/trunk/; revision=54106
|
|
remove C++ incompatibilities
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachments #10423,#10424
svn path=/trunk/; revision=48450
|
|
Use explicit casts.
svn path=/trunk/; revision=48319
|
|
input() routine and thus don't need to have it generated - and as it
produces warnings of a routine defined but not used, we don't want to
have it generated.
Squelch a casting-const-away warning.
svn path=/trunk/; revision=47613
|
|
function name;
(At least some (gcc ?) compilers give a "shadow" warning for these).
svn path=/trunk/; revision=46402
|
|
svn path=/trunk/; revision=46193
|
|
state of errno. Don't treat it as a fatal parse error because it isn't,
so we keep parsing the rest of the dictionaries even if one is missing.
svn path=/trunk/; revision=45361
|
|
- If it's something as simple as a missing $INCLUDE then we probably still want
whatever we could parse
- We weren't doing it consistently anyways
- There were a whole bunch of places where we were using it regardless of
whether or not the parse failed, leading to read-after-free errors.
svn path=/trunk/; revision=45360
|
|
radius dictionary. One of many issues with the way we load radius
dictionaries.
Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7803
svn path=/trunk/; revision=45359
|
|
replaced in the key-set of the hash table. This doesn't really provide proper
behaviour, it just stops us from accessing freed memory.
Also, add modelines.
svn path=/trunk/; revision=45354
|
|
svn path=/trunk/; revision=45016
|
|
proto_tree_add_item() calls.
For RADIUS, this means that, for string attributes that are encrypted,
we need separate fields for the encrypted and decrypted versions, the
former of which is an FT_BYTES (as its value is *NOT* a text string!)
and the latter of which is FT_STRING.
While we're at it:
make some routines static that don't need to be exported;
"encrypt=" takes a value between 1 and 3 - get the value from
the dictionary and store it, and only do User-Password-style
decryption for encrypt=1 attributes;
rename "hf64" to "hf_alt", as it's a general "alternate field",
used for 64-bit values for integral attributess, IPv6 addresses
for "combo IP" attributes, and encrypted values for string
fields;
give the URL for the FreeRADIUS dictionary file format man page.
svn path=/trunk/; revision=42530
|
|
In order to compile the whole project with -DG_DISABLE_DEPRECATED
the mate plugin needs to replace its usage of GMemChunk.
All other places should be clean.
svn path=/trunk/; revision=38392
|
|
Remove our local strerror implementation.
Mark strerror as locale unsafe API.
This fixes bug 5715.
svn path=/trunk/; revision=37812
|
|
The actual cause of an OSX compile problem: The text [^[:blank:]] in a comment.
SVN #37408 was reverted because a period (or most other characters)
in a RE character class don't need to be escaped.
This patch adds some replacement text in the spot in the comment
originally occupied by the text [^[:blank:]]
svn path=/trunk/; revision=37421
|
|
svn path=/trunk/; revision=37419
|
|
OSX-10.5 builds too.
svn path=/trunk/; revision=37408
|
|
Fixes issue caused by dictionary.foundry having ATTRIBUTE names containing
a '.' (e.g., Foundry-MAC-Authent-needs-802.1x).
So: Revert SVN #37386 which temporarily changed the '.' to '-'.
svn path=/trunk/; revision=37405
|
|
alignment problems and that wouldn't even happen if the "data" member of
a GArray were a "void *".
Clean up indentation.
svn path=/trunk/; revision=36854
|
|
"Value stored to 's' during its initialization is never read"
(it's assigned by a later g_hash_table_lookup call)
svn path=/trunk/; revision=35983
|
|
- implement "ether" attribute;
- parse "abinary" attribute [uses existing radius_abinary()]
Also: add a comment in packet-radius.h about the meaning of the encrypt flag.
svn path=/trunk/; revision=28952
|
|
In the RADIUS dissector, the function radius_register_avp_dissector() registers
vendors that are not already present in the dictionary hash-table. As far as I
can see, there are two problems with this:
1. The function does not set the number of type/length octets and the has_flags
variable for that AVP, which is required to correctly decode AVP/VSA values
2. In some situations, the function is called _before_ radius_load_dictionary()
is called (for example for the vendor 3GPP (ID: 10415))
Therefore, all vendor entries that are created by calling
radius_register_avp_dissector() leave their type_octets and length_octets un-initialized,
which causes incorrect decoding.
[Result: Radius dissector displays messages such as:
"Malformed Packet: RADIUS" and "Error/Malformed: Malformed Packet(Exception occurred)"]
The attached patch fixes this problem by assuming that the dictionary knows the
'ground truth' about the type/length octet and the has_flags information and allows it to
overwrite these values even for vendors that have already been loaded.
Also: (from Bill Meier): set the type/length octet and the has_flags variables to default
"standard" values (1,1,FALSE) in radius_register_avp_dissector().
Fixes Bug #3651 (and Bug #3635).
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3651
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3635
svn path=/trunk/; revision=28937
|
|
Radius dissector enhancement to support WiMAX vendor specific attributes.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3176
svn path=/trunk/; revision=27937
|
|
Decode ipv6prefix attributes in packet-radius.
svn path=/trunk/; revision=27769
|
|
packet-radius.c - avp specific dissectors broken
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2974
svn path=/trunk/; revision=27126
|
|
libwireshark (and the plugins using those functions) do not depend on
wiretap on Windows.
While doing that, rename the eth_* functions to ws_*.
svn path=/trunk/; revision=25354
|