Opened 5 years ago

Closed 4 years ago

#8140 closed defect (fixed)

left shift of negative value in libswscale/input.c

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

Description

Summary of the bug:
There're 4 UBSAN bugs which is left shift of negative value in libswscale/input.c

libswscale/input.c:317:42: runtime error: left shift of negative value -4865
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libswscale/input.c:317:42 in 
libswscale/input.c:317:71: runtime error: left shift of negative value -9528
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libswscale/input.c:317:71 in 
libswscale/input.c:318:71: runtime error: left shift of negative value -12061
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libswscale/input.c:318:71 in 
libswscale/input.c:318:100: runtime error: left shift of negative value -2332
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libswscale/input.c:318:100 in 

How to reproduce:

% ./ffmpeg_g -loglevel 99 -stream_loop 17 -y -r 42 -i PONDS.tif -target svcd -map 0 -ab 196k -ar 22050 -ac 20 output/tmp.hls
ffmpeg version N-94887-ge55018ee11 (git master)
built on ... ubuntu 18.04 with clang-6 and UBSAN option.

Attachments (2)

PONDS.tif (132.4 KB ) - added by Suhwan 5 years ago.
gdb-log (16.5 KB ) - added by Suhwan 5 years ago.

Download all attachments as: .zip

Change History (4)

by Suhwan, 5 years ago

Attachment: PONDS.tif added

by Suhwan, 5 years ago

Attachment: gdb-log added

comment:1 by Suhwan, 5 years ago

./ffmpeg_g -loglevel 99 -stream_loop 17 -y -r 42 -i PONDS.tif -target svcd -map 0 -ab 196k -ar 22050 -ac 20 tmp.hls

comment:2 by Carl Eugen Hoyos, 4 years ago

Component: undeterminedswscale
Priority: importantminor
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.