diff options
author | gram <gram@f5534014-38df-0310-8fa8-9805f1628bb7> | 2001-07-27 16:20:39 +0000 |
---|---|---|
committer | gram <gram@f5534014-38df-0310-8fa8-9805f1628bb7> | 2001-07-27 16:20:39 +0000 |
commit | 0efcd6147189f9d05730aa14f75f1b3e8e59bce1 (patch) | |
tree | 453aee907b335c6a4da248f61a715027d3f63b57 /epan/except.c | |
parent | 2e77e9f6a9c96d4d3b7d8092559f780a9717ca1d (diff) |
Fix for Kazlib exception code:
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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3793 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/except.c')
-rw-r--r-- | epan/except.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/except.c b/epan/except.c index a9c02d74ab..9f75b79844 100644 --- a/epan/except.c +++ b/epan/except.c @@ -13,7 +13,7 @@ * This source code may be translated into executable form and incorporated * into proprietary software; there is no requirement for such software to * contain a copyright notice related to this source. - * $Id: except.c,v 1.1 2000/09/27 04:54:49 gram Exp $ + * $Id: except.c,v 1.2 2001/07/27 16:20:39 gram Exp $ * $Name: $ */ @@ -27,7 +27,7 @@ #define XCEPT_BUFFER_SIZE 1024 #ifdef KAZLIB_RCSID -static const char rcsid[] = "$Id: except.c,v 1.1 2000/09/27 04:54:49 gram Exp $"; +static const char rcsid[] = "$Id: except.c,v 1.2 2001/07/27 16:20:39 gram Exp $"; #endif #define group except_group @@ -166,7 +166,7 @@ void except_deinit(void) #endif -static int match(const except_id_t *thrown, const except_id_t *caught) +static int match(const volatile except_id_t *thrown, const except_id_t *caught) { int group_match = (caught->group == XCEPT_GROUP_ANY || caught->group == thrown->group); int code_match = (caught->code == XCEPT_CODE_ANY || caught->code == thrown->code); @@ -367,7 +367,7 @@ static void bottom_level(void) printf("throw exception? "); fflush(stdout); fgets(buf, sizeof buf, stdin); - if (toupper(buf[0]) == 'Y') + if (buf[0] >= 0 && toupper(buf[0]) == 'Y') except_throw(1, 1, "nasty exception"); } |