aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/lanalyzer.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-04-29 19:04:17 -0700
committerGuy Harris <guy@alum.mit.edu>2016-04-30 02:04:50 +0000
commitc34cf306ab90307c23371d638478bce1d348388d (patch)
treeb2f59efe586f99b9d0fd91f3b925fedf368e1770 /wiretap/lanalyzer.c
parent44f72a90eaffc8a0322b377c4a66c11bf63340dc (diff)
Note some cases where we don't need to check the packet length.
These file formats have 16-bit packet lengths, so, even with some extra metadata added, the packet data length will never be bigger than WTAP_MAX_PACKET_SIZE. (No, we won't ever reduce WTAP_MAX_PACKET_SIZE.) Change-Id: I9e1b1d90971f91cc6e5d66d0aa93841445b2bc22 Reviewed-on: https://code.wireshark.org/review/15186 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/lanalyzer.c')
-rw-r--r--wiretap/lanalyzer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/wiretap/lanalyzer.c b/wiretap/lanalyzer.c
index 8f9fd0f63b..72ebba82e3 100644
--- a/wiretap/lanalyzer.c
+++ b/wiretap/lanalyzer.c
@@ -482,6 +482,11 @@ static gboolean lanalyzer_read_trace_record(wtap *wth, FILE_T fh,
true_size = pletoh16(&descriptor[4]);
packet_size = pletoh16(&descriptor[6]);
+ /*
+ * The maximum value of packet_size is 65535, which is less than
+ * WTAP_MAX_PACKET_SIZE will ever be, so we don't need to check
+ * it.
+ */
/*
* OK, is the frame data size greater than than what's left of the