aboutsummaryrefslogtreecommitdiffstats
path: root/editcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-04-06 14:02:49 -0700
committerGuy Harris <guy@alum.mit.edu>2019-04-06 21:04:02 +0000
commit937ec02581ee3918e6caa6de75340c28593a22d5 (patch)
tree7b248de19e92997267b3b6292d216423b4e4f4eb /editcap.c
parentf0a2b8303a9fcd18d09e27d79bd21ac19d9da7d0 (diff)
1514 is a better initial Buffer size than 1500.
Ethernet packets without the CRC are 1514 bytes long, not 1500 bytes long; using 1514 bytes will avoid a reallocation for a full-sized Ethernet packet. Change-Id: Ie8da3f13bf3df07e23e4478b7dcf84f06dec6a9d Reviewed-on: https://code.wireshark.org/review/32761 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'editcap.c')
-rw-r--r--editcap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/editcap.c b/editcap.c
index e53e4bed3b..1462e98681 100644
--- a/editcap.c
+++ b/editcap.c
@@ -1569,7 +1569,7 @@ main(int argc, char *argv[])
/* Read all of the packets in turn */
wtap_rec_init(&read_rec);
- ws_buffer_init(&read_buf, 1500);
+ ws_buffer_init(&read_buf, 1514);
while (wtap_read(wth, &read_rec, &read_buf, &read_err, &read_err_info, &data_offset)) {
if (max_packet_number <= read_count)
break;