aboutsummaryrefslogtreecommitdiffstats
path: root/epan/except.h
AgeCommit message (Collapse)AuthorFilesLines
2019-07-26HTTPS (almost) everywhere.Guy Harris1-1/+1
Change all wireshark.org URLs to use https. Fix some broken links while we're at it. Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c Reviewed-on: https://code.wireshark.org/review/34089 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-03-25Clean up REPORT_DISSECTOR_BUG().Guy Harris1-0/+2
Have it take a format and argument list as arguments, and have the formatting done inside the reporting code. That way, we're not relying on any particular wmem scope working. If WIRESHARK_ABORT_ON_DISSECTOR_BUG is set, try to add the message to the crash information (currently only supported in macOS), and print it to the standard error, before crashing. We won't necessarily have a usable crash dump to analyze, so we can't rely on that to find the cause of the crash. Ping-Bug: 14490 Change-Id: I2b39169c45c84f2ada31efa1d413bd28c140f8f4 Reviewed-on: https://code.wireshark.org/review/26643 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-06plugins: config.h must not be included by public headersJoão Valverde1-0/+1
For a sane plugin build environment. Include config.h as the first header in the .c file instead. Fix by moving required compiler attribute macros to a new "ws_attributes.h" API header. Change-Id: I34f58a927f68c1a0e59686c14d214825149749e1 Reviewed-on: https://code.wireshark.org/review/23400 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-04-08Use a single WS_NORETURN macroPeter Wu1-5/+5
Having to define two macros for marking a function as never returning seems a bit redundant. Merge the MSVC and GCC-like attributes into a single WS_NORETURN. Tested with Clang 3.7.1, GCC 4.4.7 and even GCC 4.1.2 using this small program (-Wall -Wextra, the first two generate warnings for uninitialized variables, the last one compiles without warnings): #include <stdlib.h> __attribute__((noreturn)) void foo() { exit(1); } __attribute__((noreturn)) void bar(); void bar() { exit(1); } int main() { int j, i; if (i) { bar(); return j; } foo(); return j; } Change-Id: I7d19c15e61b8f8fa4936864407199c4109f8cc82 Reviewed-on: https://code.wireshark.org/review/14822 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2014-07-06Add printf-format annotations, fix garbagePeter Wu1-1/+2
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>
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-26Fix indent (Use 4spaces) and modelines infoAlexis La Goutte1-47/+60
svn path=/trunk/; revision=54967
2013-11-10Don't test for guard-include-define (or how it's called) inside including ↵Jakub Zawadzki1-1/+1
header. svn path=/trunk/; revision=53220
2013-03-01Export libwireshark symbols using WS_DLL_PUBLIC defineBalint Reczey1-13/+14
Also remove old WS_VAR_IMPORT define and related Makefile magic everywhere in the project. svn path=/trunk/; revision=47992
2012-12-04Define variants of CLEANUP_PUSH & etc to allow nested use w/o "shadowing" ↵Bill Meier1-0/+23
variables. svn path=/trunk/; revision=46366
2011-07-11More GLIB_CHECK_VERSION cleanups. Update the minimum GLib/GTK+ versionsGerald Combs1-1/+0
in README.devloper. Remove g_gnuc.h since it's no longer needed. Remove tvbuff_init(), tvbuff_cleanup(), reassemble_init(), and reassemble_cleanup() since they were only used for older GLib versions which didn't support GSlices. Assume we always support the "matches" operator. svn path=/trunk/; revision=37978
2011-05-12Include config.h (for WS_MSVC_NORETURN) and g_gnuc.h (for G_GNUC_NORETURN)Jeff Morriss1-0/+1
svn path=/trunk/; revision=37077
2011-02-18Put WS_MSVC_NORETURN back.Gerald Combs1-4/+4
svn path=/trunk/; revision=35993
2011-02-17Fix compilation on Windows.Gerald Combs1-5/+5
svn path=/trunk/; revision=35991
2011-02-17On Windows, try putting __declspec(noreturn) in front of declarations ofGuy Harris1-9/+4
routines that don't return. (This requires that some files include config.h to get WS_MSVC_NORETURN declared properly.) svn path=/trunk/; revision=35989
2011-02-17Is there an SAL tag that says "this function never returns"?Guy Harris1-0/+5
svn path=/trunk/; revision=35978
2010-08-28Doxygen changes.Anders Broman1-1/+3
svn path=/trunk/; revision=33981
2009-07-30From Kovarththanan Rajaratnam via bug 3506:Gerald Combs1-4/+5
The exception throwing code in except.c/h should be annotated with "noreturn" to indicate that they never return. Running static analysis on Wireshark without this annotation causes a lot of false positives since these analyzers assume that the exception handling code are ordinary functions that will eventually return. svn path=/trunk/; revision=29246
2005-09-27get rid of warnings about qualifier discardingTomas Kukosa1-4/+4
svn path=/trunk/; revision=16017
2005-08-06Support throwing an exception with a null message pointer, and have theGuy Harris1-4/+13
message not be const (as we generate messages with "g_strdup_sprintf()", which means they need to be freed; using a null message means that we don't have to use a special string for exceptions with no message, and don't have to worry about not freeing that). Have THROW() throw an exception with a null message pointer. (This means that you crash if you throw DissectorError with THROW(). Don't do that - it means you don't get a more detailed explanation of the dissector problem. Use the DISSECTOR_ASSERT, etc. macros in epan/proto.h instead.) Free the exception message for DissectorError, as it's mallocated. svn path=/trunk/; revision=15250
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-1/+1
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-5/+5
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6116
2002-08-14From Tomas Kukosa: add some more routines to the plugin API.Guy Harris1-19/+19
While we're at it, add "extern" to a bunch of function declaration the preceding change *didn't* require to have the "extern" added. svn path=/trunk/; revision=5995
2001-07-27Fix for Kazlib exception code:Gilbert Ramirez1-4/+4
Defect number: 0011 Date: Jul 26 2001 Releases of Kazlib affected: 1.10 through 1.19 Status: Fixed in 1.20 Modules affected: except.c Description: Members of the except_t structure needed to be declared volatile because the structure is automatically allocated in the except macro, modified after a setjmp() takes place, and accessed after control returns via longjmp. Solution: Upgrade to 1.20 or backpatch the fix. svn path=/trunk/; revision=3793
2000-09-27First step in moving core Ethereal routines to libepan.Gilbert Ramirez1-0/+149
svn path=/trunk/; revision=2458