aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/netscreen.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-04-29 17:08:11 -0700
committerGuy Harris <guy@alum.mit.edu>2016-04-30 00:08:48 +0000
commit6a140eca7b78b230f1f90a739a32257476513c78 (patch)
tree17e7ada54ad72b72715330fb60b7e088d0762329 /wiretap/netscreen.h
parentc245be94c514079d144340bf7847f23545d76e24 (diff)
Fix packet length handling.
Treat the packet length as unsigned - it shouldn't be negative in the file. If it is, that'll probably cause the sscanf to fail, so we'll report the file as bad. Check it against WTAP_MAX_PACKET_SIZE to make sure we don't try to allocate a huge amount of memory, just as we do in other file readers. Use the now-validated packet size as the length in ws_buffer_assure_space(), so we are certain to have enough space, and don't allocate too much space. Merge the header and packet data parsing routines while we're at it. Bug: 12396 Change-Id: I7f981f9cdcbea7ecdeb88bfff2f12d875de2244f Reviewed-on: https://code.wireshark.org/review/15176 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/netscreen.h')
-rw-r--r--wiretap/netscreen.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/wiretap/netscreen.h b/wiretap/netscreen.h
index 7609e9f6c1..b3b8413594 100644
--- a/wiretap/netscreen.h
+++ b/wiretap/netscreen.h
@@ -46,9 +46,6 @@
#define NETSCREEN_INGRESS FALSE
#define NETSCREEN_EGRESS TRUE
-
-#define NETSCREEN_MAX_PACKET_LEN 65536
-
wtap_open_return_val netscreen_open(wtap *wth, int *err, gchar **err_info);
#endif