From 937ec02581ee3918e6caa6de75340c28593a22d5 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 6 Apr 2019 14:02:49 -0700 Subject: 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 --- editcap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'editcap.c') 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; -- cgit v1.2.3