From 347232ea9019245cb284f96357fabd596cc996ef Mon Sep 17 00:00:00 2001 From: Jakub Zawadzki Date: Sun, 24 Feb 2013 14:39:56 +0000 Subject: [PATCH] Fix bug #8101: tshark -2 -r fragments.pcap -R snmp -w out.pcap segmentation fault When doing second pass tshark, packet data is read to cf->pd (and not already freed cf->wth buffer). Writting files with two pass analysis never worked, buggy since introducing two pass analysis in r30076. svn path=/trunk/; revision=47851 --- tshark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tshark.c b/tshark.c index f97c12ca19..257ca00dd7 100644 --- a/tshark.c +++ b/tshark.c @@ -2943,7 +2943,7 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type, filter, so, if we're writing to a capture file, write this packet out. */ if (pdh != NULL) { - if (!wtap_dump(pdh, &cf->phdr, wtap_buf_ptr(cf->wth), &err)) { + if (!wtap_dump(pdh, &cf->phdr, cf->pd, &err)) { /* Error writing to a capture file */ switch (err) {