Opened 5 years ago

Closed 5 years ago

#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 5 years ago.
pokem.avi (128.0 KB ) - added by Suhwan 5 years ago.
poc

Download all attachments as: .zip

Change History (3)

by Suhwan, 5 years ago

Attachment: gdb-left-ac3enc added

by Suhwan, 5 years ago

Attachment: pokem.avi added

poc

comment:1 by mkver, 5 years ago

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