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
This commit is contained in:
Jakub Zawadzki 2013-02-24 14:39:56 +00:00
parent 26c04f86b0
commit 347232ea90
1 changed files with 1 additions and 1 deletions

View File

@ -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) {