aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dfilter
AgeCommit message (Collapse)AuthorFilesLines
2016-03-15FT_BOOLEAN is now stored as a 64-bit value; treat it as such.Guy Harris1-2/+2
Always look and set the uinteger64 member of the union for FT_BOOLEAN values. Bug: 12236 Change-Id: I7b0166e564b9d6cbb80051a81714a4b4c5f740a2 Reviewed-on: https://code.wireshark.org/review/14481 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-08Add EditorConfig settings for most C filesJoão Valverde2-0/+58
Change-Id: I02e6d71290bbdf7504437b0d670955b3686b6b52 Reviewed-on: https://code.wireshark.org/review/14360 Reviewed-by: João Valverde <j@v6e.pt>
2016-03-01CMake: Add more structure to libwireshark buildJoão Valverde2-1/+84
Smaller epan/CMakeLists.txt is easier to work with and this structure is well suited to CMake. It should make it easier to manage and configure each epan module differently if necessary. Change-Id: Ia649db3b7dcd405aa43dbdba3288699d5e375229 Reviewed-on: https://code.wireshark.org/review/14068 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-21autotools: Use pkg-config autoconf macros for GLib/GTKJoão Valverde1-1/+4
Remove mostly obsolete aclocal macros. Make GTK build flags a strict superset of GLib flags. Use GTK build variables for GTK GUI and GLib elsewhere. Add dependency flags explicitly instead of using WS_CPPFLAGS. Some minor improvements and fixes for missing/unnecessary variables (no impact on our test builds). Change-Id: I3e1f067a875f79d6516c1fa7af986f17a7a6b671 Reviewed-on: https://code.wireshark.org/review/14005 Reviewed-by: João Valverde <j@v6e.pt>
2016-02-14Fix two warnings for semcheck.cJoão Valverde1-2/+6
semcheck.c:986:24: warning: cast from function call of type 'sttype_id_t' to non-matching type 'int' [-Wbad-function-cast] semcheck.c:986:5: warning: format '%p' expects argument of type 'void *', but argument 3 has type 'struct stnode_t *' [-Wformat=] Change-Id: I83031251c83f6597eb7c31f35e02c5a95bd2dabb Reviewed-on: https://code.wireshark.org/review/13930 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>
2016-02-05Qt: Add check for field extractorsStig Bjørlykke2-0/+10
The proto tree is needed in several cases when using Lua field extractors, because they fetch values from the tree. Without a valid field extractor a Lua plugin may misbehave and display wrong column info. This fixes column issues when: - Calling resetColumns() in Qt. This involves adding a display filter, change time display format, change name resolution and other changes in UI which requires column updates. - Print summary lines. - Export as CSV and PSML. Change-Id: Ieed6f8578cdf2759f1f836cd8413a4529b7bbd80 Reviewed-on: https://code.wireshark.org/review/13708 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-28autotools: Don't use "user variables" to set build flagsJoão Valverde1-15/+8
GNU coding standards recommend against it and automake is designed around it. This allows overriding the global build flags using AM_CFLAGS, etc., or per object flags, something that is difficult or impossible currently because of automake precedence rules. Change-Id: I3f1ea12e560af5a46b2f04b342b1882bbf123f12 Reviewed-on: https://code.wireshark.org/review/13455 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>
2015-12-29Add support for IEEE-11073 FLOATsMichal Labedzki1-0/+6
Add support for IEEE-11073 32-bit FLOAT and 16 bit SFLOAT field types. Use them in Bluetooth ATT dissector. Change-Id: Ife0f3843da84a9af23483b0a0d9b69cd2f511d08 Reviewed-on: https://code.wireshark.org/review/12680 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-05Type cleanups.Guy Harris3-9/+10
dfilter_macro_apply_recurse() returns either NULL or a pointer to freshly-allocated memory, so it doesn't return a const pointer. dfilter_macro_apply() calls dfilter_macro_apply_recurse(), so it doesn't return a const pointer, either. In dfilter_compile(), have separate variables for the filter handed in and the macro-expanded filter, the former being const gchar * and the latter being gchar *. Change-Id: I191549bf0ff6c09c1278a98432a907c93d5e0e74 Reviewed-on: https://code.wireshark.org/review/12446 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-05Revert "Build Flex-generated files with "warnings are errors"."Guy Harris2-9/+23
This reverts commit b56f53884be3bab935058b2bbbb4da0b8bbbe7f6. Sadly, we *do* get warnings at this point with older versions of Flex, such as the one on the 32-bit OS X buildbot. Change-Id: I9aec1a16e9f2e1bbcfaac3dffdabdd89af5815e3 Reviewed-on: https://code.wireshark.org/review/12443 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-05Build Flex-generated files with "warnings are errors".Guy Harris2-23/+9
We shouldn't be getting warnings at this point. Change-Id: I363a48546cb8d916425f42962ae1697d52ed9a29 Reviewed-on: https://code.wireshark.org/review/12436 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-05Use noyywrap rather than defining our own yywrap functions.Guy Harris1-0/+5
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>
2015-11-08This doesn't need <wsutil/file_util.h>.Guy Harris1-1/+0
The only file system operations it does are printing of debugging output to the standard output, so it doesn't need <wsutil/file_util.h>. Change-Id: Ia5caf62a3aab418f039669aa0b54e163e54d0d21 Reviewed-on: https://code.wireshark.org/review/11635 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-07Remove some unnecessary includes.Guy Harris2-2/+2
Either remove them completely, or put them inside an #ifdef. Change-Id: Iceff4909e250c17812f38d94e067f7c37ab72e1b Reviewed-on: https://code.wireshark.org/review/11630 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-06Don't include io.h in Flex scanners - they're not interactive.Guy Harris1-1/+1
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>
2015-10-27Dfilter: Mark an error in %syntax_errorStig Bjørlykke1-0/+2
Because of a change in lemon the %parse_failure is not always called. Bug: 11637 Change-Id: Iea218aeee10e20f29461169829a10345bbdac903 Reviewed-on: https://code.wireshark.org/review/11302 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Tested-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-10-01Treat IPv4 subnet masks as distinct from addressesJeffrey Smith1-1/+1
While IPv4 subnet masks are obviously related and similar to IPv4 addresses, they are distinct enough that they need to be treated seperately in some aspects. For instance, there is no value in attempting to resolve a subnet mask. This change creates a new display type: BASE_NETMASK, which allows distinction from FT_IPv4 (and possible name resolution) where appropriate. Change-Id: I99e19c9a58eb613f8e58d481af84c30e2e5e14d7 Reviewed-on: https://code.wireshark.org/review/10438 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-11dfilter: Add membership operatorJeffrey Smith11-4/+285
Added a new relational test: 'x in {a b c}'. The only LHS entity supported at this time is a field. The generated DFVM operations are equivalent to an OR'ed series of =='s, but with the redundant existence tests removed. Change-Id: Iddc89b81cf7ad6319aef1a2a94f93314cb721a8a Reviewed-on: https://code.wireshark.org/review/10246 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-27Lemon grammar: fix indent (use tabs)Alexis La Goutte1-8/+8
Change-Id: I6fa38d5d85b25ac6c55fcfa67d6c8dba8482cc8c Reviewed-on: https://code.wireshark.org/review/10266 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-22Add the display filter macros dialog.Gerald Combs2-74/+14
Add some missing functionality to UatDialog. Remove what appears to be unused dfilter macro code. Change-Id: I8a8d6358523f24d5ddfe953d7741fe9af25d98eb Reviewed-on: https://code.wireshark.org/review/10187 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-02Do not try to display a value_string for FT_FRAMENUM typePascal Quantin1-1/+1
The hfinfo->strings pointer is used to store a ft_framenum_type_t Bug: 11325 Change-Id: Ia6ee1bdd4f1e6ff93907e6107fcecab56c0320de Reviewed-on: https://code.wireshark.org/review/9458 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-02Lemon: Update lemon toolsAlexis La Goutte2-2/+2
Update from SQLite trunk (19 April 2015) Add include <config.h> Fix warning: unused parameter 'argc' [-Wunused-parameter] (using _U_) Fix implicit conversion loses integer precision Fix comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare] Fix function declaration isn’t a prototype [-Wstrict-prototypes] Fix warning: old-style function definition [-Wold-style-definition] Fix trailing whitespace Fix use -T for template for epan\Makefile.nmake, epan\dfilter\Makefile.nmake, plugins\mate\Makefile.nmake, plugins\tpg\Makefile.nmake and cmake/modules/UseLemon.cmake Fix -Wmissing-prototypes Remove unused function (acttab_free) Add basename the filename with only filename (no path...) Fix lemon.c:3435: warning: implicit conversion shortens 64-bit value into a 32-bit value Add "new" version of lempar.c (3 November 2009). LEMPAR: fix trailing whitespace LEMPAR: fix -Wunused-parameter Change-Id: I2df7e39c9a6846de26743a981fb76aca423fe813 Reviewed-on: https://code.wireshark.org/review/6502 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-21Make FT_{U}INT64 behave more like FT_{U}INT32, add support for ↵JC Wren1-1/+19
FT_{U}INT{40,48,56} Change-Id: I57354c309ecf3a0c8f0c7cff485638027f30bb19 Reviewed-on: https://code.wireshark.org/review/5813 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-18Make UAT record update callbacks return a success/failure indication.Guy Harris1-2/+2
Have them return TRUE on success and FALSE on failure. Check the return value rather than whether the error string pointer is null or not. Change-Id: I800a03bcd70a6bbb7b217cf7c4800e9cdcf2189c Reviewed-on: https://code.wireshark.org/review/7222 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-17Make it a bit more like the way it was before all these changes.Guy Harris1-2/+2
Change-Id: I9fc0ef50574a7e068c32e3f6ffeb3634df9474d4 Reviewed-on: https://code.wireshark.org/review/7212 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-17A UAT's update is expected to set *error; do so.Guy Harris1-1/+3
Its callers treat a non-null error pointer as a failure and a null error pointer as a success, so it has to set *error, even if it's only setting it to NULL. Change-Id: I48b2faa4bc013e4a754180dfae487829c8fe35a6 Reviewed-on: https://code.wireshark.org/review/7211 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-16Revert "Revert "Fix duplicate Display Filter Macro check""Guy Harris1-15/+20
This reverts commit 876c322df8b6a944cb4358c313c4fc46afe99719. Wrong branch. It builds in master; it does *not* build in 1.12 or 1.10. Change-Id: I3a2409d5a37f08965d6caac64dc97a48a1c5d1b8 Reviewed-on: https://code.wireshark.org/review/7152 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-16Revert "Fix duplicate Display Filter Macro check"Guy Harris1-20/+15
This reverts commit f5902a677e24ff96869d3c335f4fb8aaa6d0e543. This is not a simple cherry-pick; backporting this fix will have to be done manually. Change-Id: I53efc06a8e35c6b1aa793edf4e702cabee2e929b Reviewed-on: https://code.wireshark.org/review/7151 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-15Fix duplicate Display Filter Macro checkPeter Wu1-15/+20
Since commit 4a1bd75b60171d781dc9f2d3ffd6d498acc74b1a (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7471), the data pointer does not match anything from the macros array. This patch fixes a false warning by checking for duplicates before the name is committed. Bug: 10957 Change-Id: Id61110bf63de1de80b85524705a2df6a5e7be33a Reviewed-on: https://code.wireshark.org/review/7119 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-13epan/dfilter/*.c: As needed: Add editor modelines & Fix indentationBill Meier13-122/+289
Change-Id: I410839329a98bd806c60961dfb9693d5eeeeb702 Reviewed-on: https://code.wireshark.org/review/7104 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-09(Trivial) Fix printf-related 'Mismatch on sign' warningsBill Meier2-3/+3
Found by MSVC2013 Code Analysis Change-Id: I58063946dd558e98308c87b36eeac0ddbe1a6e79 Reviewed-on: https://code.wireshark.org/review/7045 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-18Remove some apparently-unnecessary includes of emem.h.Guy Harris1-1/+0
Change-Id: Id50ce3e707056cca8f30052f05c451ce431b39b5 Reviewed-on: https://code.wireshark.org/review/6632 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-18Clean up ftype-conversion and dfilter error message string handling.Guy Harris10-207/+267
Have dfilter_compile() take an additional gchar ** argument, pointing to a gchar * item that, on error, gets set to point to a g_malloc()ed error string. That removes one bit of global state from the display filter parser, and doesn't impose a fixed limit on the error message strings. Have fvalue_from_string() and fvalue_from_unparsed() take a gchar ** argument, pointer to a gchar * item, rather than an error-reporting function, and set the gchar * item to point to a g_malloc()ed error string on an error. Allow either gchar ** argument to be null; if the argument is null, no error message is allocated or provided. Change-Id: Ibd36b8aaa9bf4234aa6efa1e7fb95f7037493b4c Reviewed-on: https://code.wireshark.org/review/6608 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-18Trim down the use of ep_ memory in the display filter code.Michael Mann4-22/+31
Couldn't quite eliminate it completely, but it's much improved. Need to figure out where/when to free dfilter_error_msg. Change-Id: I10216e9546d38e83f69991ded8ec0b3fc8472035 Reviewed-on: https://code.wireshark.org/review/6591 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-13Consistently use the "g_string_free returns a C string pointer" idiom.Guy Harris1-4/+2
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>
2015-01-13UAT error string pointers should not be const pointers.Guy Harris1-2/+2
UAT error strings are usually allocated by g_strdup() or g_strdup_printf(), and must ultimately be freed by the caller. Make the pointer-to-error-string-pointer arguments to various functions be "char **", not "const char **". Fix cases that finds where a raw string was being used, as that won't work if you try to free it; g_strdup() it instead. Add a missing free of an error string. Remove some no-longer-necessary casts. Remove some unnecessary g_strdup()s (the string being handed to it was already g_malloc()ated). Change some variable declarations to match. Put in XXX comments for some cases where the error string is just freed, without being shown to the user. Change-Id: I40297746a2ef729c56763baeddbb0842386fa0d0 Reviewed-on: https://code.wireshark.org/review/6525 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-12Remove emem APIs from UAT functionality.Michael Mann1-2/+2
Change-Id: I009c09f25d170e5c9aaaef713eaacb3252817856 Reviewed-on: https://code.wireshark.org/review/6460 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-11Revert "Lemon: Update lemon tools"Pascal Quantin2-2/+2
This reverts commit 5855dd8d538eb81d4825961b1bf0d583bf96f751. This Lemon update fails to compile on OSX and triggers asserts on other platforms Change-Id: I12a8a2bf32db31e5a9b0cb1a67a39724e30f3e91 Reviewed-on: https://code.wireshark.org/review/6496 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-11Lemon: Update lemon toolsAlexis La Goutte2-2/+2
Fix warning: declaration shadows a variable in the global scope [-Wshadow] Add include <config.h> Fix warning: unused parameter 'argc' [-Wunused-parameter] (using _U_) Fix implicit conversion loses integer precision Fix comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare] Fix function declaration isn’t a prototype [-Wstrict-prototypes] Fix warning: old-style function definition [-Wold-style-definition] Fix trailing whitespace Fix use -T for template for epan\Makefile.nmake, epan\dfilter\Makefile.nmake, plugins\mate\Makefile.nmake, plugins\tpg\Makefile.nmake and cmake/modules/UseLemon.cmake Fix -Wmissing-prototypes Remove unused function (acttab_free) Add basename the filename with only filename (no path...) Change-Id: Ia79f61e29f828575df61cc89134c6c553044e86d Reviewed-on: https://code.wireshark.org/review/3976 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-01-04Create BASE_DOT, BASE_DASH, and BASE_SEMICOLON types for the FT_BYTES field ↵Michael Mann2-2/+2
type. These "bases" will put a ".", "-", or ":" respectively between hexidecimal bytes in the field in packet view and display filter. FT_BYTES with BASE_NONE will have no separator in the packet view, but continue to have the ':' as a separator in the display filter. Converted the "string" hf_ entries that used tvb_fc_to_str as a string to use proto_tree_add_item with FT_BYTES/BASE_DOT type. Converted applicable tvb_bytes_to_ep_str_punct() calls to use the new BASE values. Change-Id: I2442185bb314d04a3ff2ba57883652ecd738b5f9 Reviewed-on: https://code.wireshark.org/review/6098 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-02Add '*.nativecodeanalysis.xml' to 'clean' targetsBill Meier1-1/+1
Change-Id: I90dbf0b31fc737150a01533763a7869b34c68cb6 Reviewed-on: https://code.wireshark.org/review/6220 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-28Create FT_FCWWN field type.Michael Mann1-1/+4
Also, convert the "string" hf_ entries that used tvb_fcwwn_to_str as a string to use proto_tree_add_item with FT_FCWWN type. Change-Id: I4ca77870499fd8239584a70874998b5d194a7167 Reviewed-on: https://code.wireshark.org/review/6036 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-18DisplayFilter: Check also another fields with the same nameMichal Labedzki1-33/+18
This adds possibility to have two fields with the same abbrev name but different type, for example FT_ETHER and FT_STRING. That allows to compare each one to find a valid field. Change-Id: I8b2a1708ac9648b7a4289777c72a0f3b18f3d8f8 Reviewed-on: https://code.wireshark.org/review/5702 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-11-17display filter: the body of a range should only beMartin Kaiser1-2/+5
a string, a field name or another range - not an unparsed element Bug: 10690 Change-Id: I126143636c940cc73ed6467660f0a573209e2ae9 Reviewed-on: https://code.wireshark.org/review/5243 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-10-17No need for our own wrappers around tolower() and toupper().Guy Harris1-20/+3
We can just use g_ascii_tolower() and g_ascii_toupper(); Change-Id: I8a88a096d16ce8c60dd9151e5bdddf6747702145 Reviewed-on: https://code.wireshark.org/review/4754 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-16Use g_ascii_isalnum() rather than isalnum().Guy Harris1-3/+2
That way, we don't have to worry about casting the argument (which, in one place, was done wrong - casting to int preserves the sign-extension done with signed chars), and don't have to worry about a locale in which particular 8-bit byte values are considered alphanumeric characters. Change-Id: I129b4bfdad70ade4ab6e0a1d2c13d59ae9e6f524 Reviewed-on: https://code.wireshark.org/review/4751 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-09-13when we check the parameter for upper(), lower() or len(),Martin Kaiser1-1/+1
return an error if the parameter is _no_ string Bug: 10401 Change-Id: I5643ef05009072538155e63c3178071ed6bab061 Reviewed-on: https://code.wireshark.org/review/4071 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-20Use forward slashes in paths to runlex.shРоман Донченко1-1/+1
This gets rid of "MS-DOS style path detected" warnings from Cygwin. Change-Id: Id10429669704aa371dbf56a9398947c8002260ad Reviewed-on: https://code.wireshark.org/review/3024 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Wireshark Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-07-16Don't use __func__, use G_STRFUNC.Guy Harris1-1/+1
Not all compilers we use support __func__. Change-Id: I61194e1073c87e67f821e14698ea21b73d63983c Reviewed-on: https://code.wireshark.org/review/3071 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-06Add printf-format annotations, fix garbagePeter Wu3-8/+8
The WRETH dissector showed up some garbage in the column display. Upon further inspection, it turns out that the format string had a trailing percent sign which caused (unsigned)-1 to be returned by g_printf_string_upper_bound (in emem_strdup_vprintf). Then ep_alloc is called with (unsigned)-1 + 1 = 0 memory, no wonder that garbage shows up. ASAN could not even catch this error because EP is in charge of this. So, start adding G_GNUC_PRINTF annotations in each header that uses the "fmt" or "format" paramters (grepped + awk). This revealed some other errors. The NCP2222 dissector was missing a format string (not a security vuln though). Many dissectors used val_to_str with a constant (but empty) string, these have been replaced by val_to_str_const. ASN.1 dissectors were regenerated for this. Minor: the mate plugin used "%X" instead of "%p" for a pointer type. The ncp2222 dissector and wimax plugin gained modelines. Change-Id: I7f3f6a3136116f9b251719830a39a7b21646f622 Reviewed-on: https://code.wireshark.org/review/2881 Reviewed-by: Evan Huus <eapache@gmail.com>