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:
parent
26c04f86b0
commit
347232ea90
2
tshark.c
2
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
|
filter, so, if we're writing to a capture file, write
|
||||||
this packet out. */
|
this packet out. */
|
||||||
if (pdh != NULL) {
|
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 */
|
/* Error writing to a capture file */
|
||||||
switch (err) {
|
switch (err) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue