Wireshark-bugs: [Wireshark-bugs] [Bug 7515] New: Possible leaks of wtap_pkthdr->opt_comment (pac
Date: Sun, 22 Jul 2012 13:37:23 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7515

           Summary: Possible leaks of wtap_pkthdr->opt_comment (packet
                    comment)
           Product: Wireshark
           Version: SVN
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Low
         Component: Capture file support (libwiretap)
        AssignedTo: bugzilla-admin@xxxxxxxxxxxxx
        ReportedBy: darkjames-ws@xxxxxxxxxxxx


Build Information:
svn/r43917
--
Hi,

In pcapng_read_packet_block() memory for pkthdr->opt_comment is allocated with:
  wblock->packet_header->opt_comment = g_strndup(option_content,
oh.option_length);

But is never freed.

Comment from pkthdr->opt_comment to frame structure is copied in
frame_data_init(), but it's only done on initial reading. 
refiltering or any actions which requires reading packet again causes
(possible) memleaks.

(code review, not verified with valgrind)

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.