[libav-bugs] [Bug 1069] New: Memory leak in libavcodec/vorbisdec.c, at function vorbis_parse_setup_hdr_codebooks()

bugzilla at libav.org bugzilla at libav.org
Tue Jun 27 07:18:04 CEST 2017


https://bugzilla.libav.org/show_bug.cgi?id=1069

            Bug ID: 1069
           Summary: Memory leak in libavcodec/vorbisdec.c, at function
                    vorbis_parse_setup_hdr_codebooks()
           Product: Libav
           Version: git HEAD
          Hardware: Other
                OS: Mac OS
            Status: NEW
          Severity: normal
          Priority: ---
         Component: libavcodec
          Assignee: bugzilla at libav.org
          Reporter: shqking at gmail.com

Created attachment 671
  --> https://bugzilla.libav.org/attachment.cgi?id=671&action=edit
one possible patch

Hello.

Memory leak is found in libavcodec/vorbisdec.c, at function
vorbis_parse_setup_hdr_codebooks().
I get the source code through the git https://git.libav.org/?p=libav.git.

In function vorbis_parse_setup_hdr_codebooks(), 'tmp_vlc_bits', 'tmp_vlc_codes'
and 'tmp_vlc_codes' are allocated at lines 243 to 245.
However, these memory are NOT freed at line 376 when some exception happens.
This would lead to memory leak.

Attached please find one possible patch.
Thanks.

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libav.org/pipermail/libav-bugs/attachments/20170627/a242c5e1/attachment.html>


More information about the libav-bugs mailing list