[FFmpeg-trac] #8180(undetermined:new): signed integer overflow in libavutil/mathematics.c

FFmpeg trac at avcodec.org
Thu Sep 19 18:38:02 EEST 2019

#8180: signed integer overflow in libavutil/mathematics.c
             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 signed integer overflow bug in libavutil/mathematics.c
 libavutil/mathematics.c:201:39: runtime error: signed integer overflow:
 9223372036854775807 - -83712 cannot be represented in type 'long'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
 libavutil/mathematics.c:201:39 in
 How to reproduce:
 % ./ffmpeg_g -stream_loop 0 -y -r 37 -i bug533822.ogg -loglevel 99 -map 0
 -ar 22050 tmp.wav

 ffmpeg version N-94969-gc2ab998ff3 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/8180>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list