[FFmpeg-trac] #3014(swscale:new): sws_scale() renders a frame buffer invalid for memory freeing in a specific situation

FFmpeg trac at avcodec.org
Sun Sep 29 17:07:34 CEST 2013


#3014: sws_scale() renders a frame buffer invalid for memory freeing in a specific
situation
---------------------------------+--------------------------------------
             Reporter:  cyril    |                     Type:  defect
               Status:  new      |                 Priority:  normal
            Component:  swscale  |                  Version:  git-master
             Keywords:           |               Blocked By:
             Blocking:           |  Reproduced by developer:  0
Analyzed by developer:  0        |
---------------------------------+--------------------------------------
 Summary of the bug:
 After reading small jpegs and then converting them to the BGRA color space
 using sws_scale(), the resulting frame buffer is corrupted and freeing
 memory taken by the buffer lead to a debug error.

 How to reproduce:
 1/ Under Windows 7 and Visual Studio 2010, create a C++ Win32 console app
 called JpegTest (I'm using VS Pro but it should be ok with VS Express).
 2/ Copy-paste the attached JpegTest.cpp within the resulting solution.
 3/ Compile the latest FFmpeg to obtain .lib and .dll (or download the
 latest Zeranoe dev and shared zip)
 4/ Configure the solution so it can compile with FFmpeg by configuring the
 lib and include path (Project > Properties > VC++ Directories).
 5/ Don't forget to put the attached inttypes.h in the include path.
 6/ Put the dlls in the generated Debug folder
 7/ Change JpegTest.cpp so that it properly refers to the root_banner.jpg
 file.
 8/ Launch in debug mode, during execution, you should get a debug
 breakpoint because of heap corruptions.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/3014>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list