aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Fisher <steve@stephen-fisher.com>2008-01-22 01:05:32 +0000
committerStephen Fisher <steve@stephen-fisher.com>2008-01-22 01:05:32 +0000
commita3c2114fbae1437a2f91fd0f83ddca0faa91e6bf (patch)
tree791c64d1ff5f7a19ec036be3480a836754ff15fd
parent531879ad82dd0aa7c8e87440a05716311fa42c2d (diff)
Use WTAP_MAX_PACKET_SIZE in place of 65535 in sanity check for snap len
(although they are the same value right now) svn path=/trunk/; revision=24159
-rw-r--r--wiretap/pcapng.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wiretap/pcapng.c b/wiretap/pcapng.c
index a05f657eea..7968748499 100644
--- a/wiretap/pcapng.c
+++ b/wiretap/pcapng.c
@@ -465,7 +465,7 @@ pcapng_read_if_descr_block(FILE_T fh, pcapng_block_header_t *bh, pcapng_t *pn, w
/* XXX - sanity check of snapshot length */
/* XXX - while a very big snapshot length is valid, it's more likely that it's a bug in the file */
/* XXX - so do a sanity check for now, it's likely e.g. a byte swap order problem */
- if(wblock->data.if_descr.snap_len > 65535) {
+ if(wblock->data.if_descr.snap_len > WTAP_MAX_PACKET_SIZE) {
g_warning("pcapng_read_if_descr_block: snapshot length %u unrealistic",
wblock->data.if_descr.snap_len);
/*wblock->data.if_descr.snap_len = 65535;*/