#8144 closed defect (fixed)

left shift of negative value bug in libavcodec/ac3enc.c

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

Description

Summary of the bug:
There's left shift of negative value bug in libavcodec/ac3enc.c

libavcodec/ac3enc.c:1068:37: runtime error: left shift of negative value -32
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libavcodec/ac3enc.c:1068:37 in 

How to reproduce:

% ./ffmpeg_g -t 1 -y -r 61 -i pokem.avi -target dvd -map 0 -aframes 91 -r 114 -ab 123k -ar 48000 -ac 20 output/tmp.aiff

ffmpeg version N-94887-ge55018ee11 (git master)
built on ... ubuntu 18.04 with clang-6 and UBSAN option.

Attachments (2)

gdb-left-ac3enc (6.4 KB) - added by Suhwan 13 months ago.
pokem.avi (128.0 KB) - added by Suhwan 13 months ago.
poc

Download all attachments as: .zip

Change History (3)

Changed 13 months ago by Suhwan

Changed 13 months ago by Suhwan

poc

comment:1 Changed 12 months ago by mkver

  • Component changed from undetermined to avcodec
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.