diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-04-06 14:02:49 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-04-06 21:04:02 +0000 |
commit | 937ec02581ee3918e6caa6de75340c28593a22d5 (patch) | |
tree | 7b248de19e92997267b3b6292d216423b4e4f4eb /capinfos.c | |
parent | f0a2b8303a9fcd18d09e27d79bd21ac19d9da7d0 (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 'capinfos.c')
-rw-r--r-- | capinfos.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |