[FFmpeg-trac] #8483(avcodec:new): UBSan: outside the range of unsigned int
FFmpeg
trac at avcodec.org
Sun Jan 19 12:01:17 EET 2020
#8483: UBSan: outside the range of unsigned int
----------------------------------------+----------------------------------
Reporter: andreafioraldi | Type: defect
Status: new | Priority: normal
Component: avcodec | Version: 4.2
Keywords: ubsan | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
----------------------------------------+----------------------------------
Build ffmpeg 4.2.2 using clang and ubsan (-fsanitize=undefined).
Command line: ./ffmpeg.ubsan -y -i ./input -c:v mpeg4 -c:a out.mp4
Output:
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with clang version 8.0.0-3~ubuntu18.04.2 (tags/RELEASE_800/final)
configuration: --cc=clang-8 --cxx=clang++-8 --ld=clang-8
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
Trailing options were found on the commandline.
libavformat/ircamdec.c:69:23: runtime error: -1.45475e+29 is outside the
range of representable values of type 'unsigned int'
input_invalid_uint: Invalid data found when processing input
UBSan give the following error:
libavformat/ircamdec.c:69:23: runtime error: -4.25353e+37 is outside the
range of representable values of type 'unsigned int'
Line 69 is (in case that the line number is misaligned in master):
sample_rate = av_int2float(avio_rl32(s->pb));
Not sure what is the bug here, I'm not enough confident with the codebase,
but there is a bug cause UBSan has not false positive.
I attach a minimal input that triggers the bug in base64:
ZKMBAAAH6+8XDg4OIA==
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8483>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list