Wireshark-bugs: [Wireshark-bugs] [Bug 9106] Wireshark crashes when using "Export Specified Packe
Date: Thu, 05 Sep 2013 20:35:21 +0000

Comment # 3 on bug 9106 from
I can reproduce a crash when opening the Netmon2 capture from comment#2 and
export the packets to pcap format.

The crash occurs in file.c, save_packet() function, line 4081:
  hdr.opt_comment  = g_strdup(pkt_comment);
because phdr->opt_comment (used to initialize pkt_comment) is never
initialized. process_specified_packets() function puts a struct wtap_pkthdr
phdr that is never fully initialized (phdr->opt_comment is never set to NULL).

An easy fix would be to add a memset of the phdr structure before starting to
use it, but I wonder why it would pop only now.

I checked in the memset in r51791. Jon, could you give it a try?

Others, feel free to amend my change if it is not the best way to fix it.


You are receiving this mail because:
  • You are watching all bug changes.