[FFmpeg-trac] #8192(undetermined:new): Division by zero bug from libavcodec/aacenc.c:903

FFmpeg trac at avcodec.org
Sun Sep 22 19:20:01 EEST 2019

#8192: Division by zero bug from libavcodec/aacenc.c:903
             Reporter:  Suhwan       |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:  ubsan        |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
 Summary of the bug:
 There is a Division by zero bug from libavcodec/aacenc.c:903
 libavcodec/aacenc.c:903:62: runtime error: division by zero
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
 libavcodec/aacenc.c:903:62 in
 [aac @ 0x619000004180] Qavg: -nan
 905         ff_mdct_end(&s->mdct1024);
 (gdb) bt
 #0  aac_encode_end (avctx=0x619000004180) at libavcodec/aacenc.c:905
 #1  0x000000000509f9fa in avcodec_close (avctx=<optimized out>) at
 #2  0x00000000045d4688 in avcodec_free_context (pavctx=0x6160000045e0) at
 #3  0x00000000005df0e8 in ffmpeg_cleanup (ret=0) at fftools/ffmpeg.c:571
 #4  0x00000000005afb95 in exit_program (ret=0) at fftools/cmdutils.c:139
 #5  0x00000000005db973 in main (argc=<optimized out>, argv=<optimized
 out>) at fftools/ffmpeg.c:4911
 How to reproduce:
 % ./ffmpeg_g -y -r 106 -i mjpegb.mov -loglevel 0 -map 0 -c:v:117 mov_text
 -disposition:a:151 aptx -vframes 12 -aframes 23 -ab 418k -ar 22050 -strict
 1 tmp.mov

 ffmpeg version N-94982-gea673a0edb Copyright (c) 2000-2019 the FFmpeg
   built with clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
   configuration: --cc=clang --cxx=clang++ --ld=clang --enable-debug

Ticket URL: <https://trac.ffmpeg.org/ticket/8192>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list