[FFmpeg-trac] #8237(undetermined:new): Division by zero at libavfilter/af_adeclick.c
FFmpeg
trac at avcodec.org
Thu Oct 10 21:51:15 EEST 2019
#8237: Division by zero at libavfilter/af_adeclick.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 are 2 Division by zero at libavfilter/af_adeclick.c:684,228
{{{
Breakpoint 1, uninit (ctx=0x611000000900) at libavfilter/af_adeclick.c:684
684 s->nb_samples, 100. * s->detected_errors /
s->nb_samples);
(gdb) print s->nb_samples
$1 = 0
(gdb) bt
#0 uninit (ctx=0x611000000900) at libavfilter/af_adeclick.c:684
#1 0x000000000110cde1 in avfilter_free (filter=0x611000000900) at
libavfilter/avfilter.c:771
#2 0x0000000001174600 in avfilter_graph_free (graph=0x7fffffffdb20) at
libavfilter/avfiltergraph.c:126
#3 0x00000000006e02d0 in init_complex_filtergraph (fg=0x60a000000040) at
fftools/ffmpeg_filter.c:377
#4 0x00000000005173c9 in init_complex_filters () at
fftools/ffmpeg_opt.c:2102
#5 ffmpeg_parse_options (argc=<optimized out>, argv=<optimized out>) at
fftools/ffmpeg_opt.c:3324
#6 0x000000000081bc75 in main (argc=23, argv=0x7fffffffe138) at
fftools/ffmpeg.c:4872
(gdb) c
Continuing.
libavfilter/af_adeclick.c:684:53: runtime error: division by zero
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
libavfilter/af_adeclick.c:684:53 in
libavfilter/af_adeclick.c:228:25: runtime error: division by zero
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
libavfilter/af_adeclick.c:228:25 in
}}}
How to reproduce:
{{{
% ffmpeg_g -y -r 49 -i $PoC -filter_complex adeclick -loglevel 0 -c:s:7
h264_v4l2m2m -disposition:s:3 apng -vframes 35 -ab 267k -ac 0 -strict 1
tmp.ast
ffmpeg version N-95291-g5345965b3f Copyright (c) 2000-2019 the FFmpeg
developers
built with clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
configuration: --cc=clang --cxx=clang++ --ld=clang --enable-debug
--toolchain=clang-usan
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8237>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list