Opened 10 years ago

Closed 10 years ago

#3858 closed defect (fixed)

memleak on broken (encrypted) input file

Reported by: Carl Eugen Hoyos Owned by:
Priority: minor Component: ffmpeg
Version: git-master Keywords: leak
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

A vob file was uploaded to incoming that is interpreted as aac audio, FFmpeg leaks memory when trying to decode the sample.

$ valgrind --leak-check=full ./ffmpeg_g -i test -f null -
==6798== Memcheck, a memory error detector
==6798== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==6798== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==6798== Command: ./ffmpeg_g -i test -f null -
==6798== 
ffmpeg version N-65661-g9c712d0 Copyright (c) 2000-2014 the FFmpeg developers
  built on Aug 15 2014 20:24:46 with gcc 4.8 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      54.  3.100 / 54.  3.100
  libavcodec     56.  0.101 / 56.  0.101
  libavformat    56.  1.100 / 56.  1.100
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  0.100 /  5.  0.100
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  0.100 /  1.  0.100
  libpostproc    53.  0.100 / 53.  0.100
[aac @ 0x9c87820] Format aac detected only with low score of 1, misdetection possible!
[aac @ 0x9c9a3e0] channel element 3.7 is not allocated
[aac @ 0x9c9a3e0] More than one AAC RDB per ADTS frame is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.                                                                                                                                  
[aac @ 0x9c9a3e0] channel element 3.13 is not allocated
[aac @ 0x9c87820] decoding for stream 0 failed
[aac @ 0x9c87820] Estimating duration from bitrate, this may be inaccurate
[aac @ 0x9c87820] Could not find codec parameters for stream 0 (Audio: aac, 3.0, fltp, 442 kb/s): unspecified sample rate                                                          
Consider increasing the value for the 'analyzeduration' and 'probesize' options
test: could not find codec parameters
Input #0, aac, from 'test':
  Duration: 00:00:00.01, bitrate: 442 kb/s
    Stream #0:0: Audio: aac, 3.0, fltp, 442 kb/s
[abuffer @ 0x9d93b60] Value inf for parameter 'time_base' out of range [0 - 2.14748e+09]
    Last message repeated 3 times
[abuffer @ 0x9d93b60] Error setting option time_base to value 1/0.
[graph 0 input from stream 0:0 @ 0x9d939e0] Error applying options to the filter.
Error opening filters!
==6798== 
==6798== HEAP SUMMARY:
==6798==     in use at exit: 144 bytes in 4 blocks
==6798==   total heap usage: 323 allocs, 319 frees, 1,179,645 bytes allocated
==6798== 
==6798== 32 bytes in 1 blocks are definitely lost in loss record 1 of 4
==6798==    at 0x4C29E00: memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==6798==    by 0x4C29F27: posix_memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==6798==    by 0xCC94EF: av_mallocz (mem.c:95)
==6798==    by 0x49B6AD: link_filter_inouts (graphparser.c:239)
==6798==    by 0x49BDBE: avfilter_graph_parse2 (graphparser.c:410)
==6798==    by 0x4794F9: configure_filtergraph (ffmpeg_filter.c:888)
==6798==    by 0x47FD42: transcode_init (ffmpeg.c:2691)
==6798==    by 0x466D1C: main (ffmpeg.c:3646)
==6798== 
==6798== 32 bytes in 1 blocks are definitely lost in loss record 2 of 4
==6798==    at 0x4C29E00: memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==6798==    by 0x4C29F27: posix_memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==6798==    by 0xCC94EF: av_mallocz (mem.c:95)
==6798==    by 0x49B610: link_filter_inouts (graphparser.c:264)
==6798==    by 0x49BDBE: avfilter_graph_parse2 (graphparser.c:410)
==6798==    by 0x4794F9: configure_filtergraph (ffmpeg_filter.c:888)
==6798==    by 0x47FD42: transcode_init (ffmpeg.c:2691)
==6798==    by 0x466D1C: main (ffmpeg.c:3646)
==6798== 
==6798== LEAK SUMMARY:
==6798==    definitely lost: 64 bytes in 2 blocks
==6798==    indirectly lost: 0 bytes in 0 blocks
==6798==      possibly lost: 0 bytes in 0 blocks
==6798==    still reachable: 80 bytes in 2 blocks
==6798==         suppressed: 0 bytes in 0 blocks
==6798== Reachable blocks (those to which a pointer was found) are not shown.
==6798== To see them, rerun with: --leak-check=full --show-reachable=yes
==6798== 
==6798== For counts of detected and suppressed errors, rerun with: -v
==6798== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 2 from 2)

Attachments (1)

test (500 bytes ) - added by Carl Eugen Hoyos 10 years ago.

Download all attachments as: .zip

Change History (3)

by Carl Eugen Hoyos, 10 years ago

Attachment: test added

comment:1 by Carl Eugen Hoyos, 10 years ago

Component: undeterminedffmpeg
Priority: normalminor

comment:2 by Carl Eugen Hoyos, 10 years ago

Resolution: fixed
Status: newclosed

Fixed in 494cbc42

Note: See TracTickets for help on using tickets.