aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/ascend-int.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-09-15 18:32:21 -0700
committerGuy Harris <guy@alum.mit.edu>2016-09-16 01:32:47 +0000
commit1158576622d677884a3ce4aa169873d453897c9d (patch)
tree63148a483bee62370303d80bf3dc5ee3ba02c599 /wiretap/ascend-int.h
parent7a7d162a494e3ccf15f58f1d710dcf645cfa02b1 (diff)
Don't pick up junk from an unset error-number variable.
Keep the actual error code and pointer-to-error-string in the scanner state, rather than pointers to the variables passed in to us. Initialize them to 0 and NULL, respectively. That way, when the actual scanner routine returns, we don't check for an error by looking at the error variable pointed to by our argument, which might not have been set by the scanner and might have stack junk in it, we look at a structure member we set to 0 before the scan. Change-Id: I81a4fd6d5cf5e56f5638fae1253c48dc50c9c36d Reviewed-on: https://code.wireshark.org/review/17721 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/ascend-int.h')
-rw-r--r--wiretap/ascend-int.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/wiretap/ascend-int.h b/wiretap/ascend-int.h
index c6bb3cc019..791cf751ae 100644
--- a/wiretap/ascend-int.h
+++ b/wiretap/ascend-int.h
@@ -36,8 +36,8 @@ typedef struct {
typedef struct {
FILE_T fh;
const gchar *ascend_parse_error;
- int *err;
- gchar **err_info;
+ int err;
+ gchar *err_info;
struct ascend_phdr *pseudo_header;
guint8 *pkt_data;