Opened 5 years ago

Closed 3 years ago

#8269 closed defect (fixed)

outside the range of int at libavfilter/vf_dctdnoiz.c

Reported by: Suhwan Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: ubsan
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
There are an outside the range of int and 2 integer division by zero at libavfilter/vf_dctdnoiz.c

I compiled ffmpeg with "--toolchain=clang-usan" to check the undefined-behaviours and attached log file.
How to reproduce:

% ffmpeg_g  -y -i $PoC -filter_complex dctdnoiz -target dv -loglevel 0 -map 0  tmp.epaf

ffmpeg version N-95343-ge835a9d302 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

Here's UBSAN log

libavfilter/vf_dctdnoiz.c:593:39: runtime error: division by zero
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libavfilter/vf_dctdnoiz.c:593:39 in 
libavfilter/vf_dctdnoiz.c:593:15: runtime error: inf is outside the range of representable values of type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libavfilter/vf_dctdnoiz.c:593:15 in 
libavfilter/vf_dctdnoiz.c:613:45: runtime error: division by zero
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libavfilter/vf_dctdnoiz.c:613:45 in

Please confirm.
Thanks

Attachments (2)

log_vf_dctdnoiz (14.5 KB ) - added by Suhwan 5 years ago.
PoC_vf_dctdnoiz.xpm (122 bytes ) - added by Suhwan 5 years ago.
poc

Download all attachments as: .zip

Change History (3)

by Suhwan, 5 years ago

Attachment: log_vf_dctdnoiz added

by Suhwan, 5 years ago

Attachment: PoC_vf_dctdnoiz.xpm added

poc

comment:1 by Elon Musk, 3 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.