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 --- capinfos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'capinfos.c') diff --git a/capinfos.c b/capinfos.c index 8a85276ba3..753e1c57a3 100644 --- a/capinfos.c +++ b/capinfos.c @@ -1166,7 +1166,7 @@ process_cap_file(const char *filename, gboolean need_separator) /* Tally up data that we need to parse through the file to find */ wtap_rec_init(&rec); - ws_buffer_init(&buf, 1500); + ws_buffer_init(&buf, 1514); while (wtap_read(wth, &rec, &buf, &err, &err_info, &data_offset)) { if (rec.presence_flags & WTAP_HAS_TS) { prev_time = cur_time; -- cgit v1.2.3