Opened 5 years ago

Closed 4 years ago

#8166 closed defect (fixed)

left shift of negative value bugs in libswscale/swscale.c

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

Description

Summary of the bug:
There're left shift of negative value bugs in libswscale/swscale.c

libswscale/swscale.c:301:18: runtime error: left shift of negative value -1056
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libswscale/swscale.c:301:18 in 
libswscale/swscale.c:302:18: runtime error: left shift of negative value -1056
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libswscale/swscale.c:302:18 in

How to reproduce:

% ./ffmpeg_g -t 3 -y -r 38 -i mszh_rgb24.avi -target dv -map 0 -aframes 37 -r 105 -ar 48000 -ac 1 -strict 1 output/tmp.avi

ffmpeg version N-94943-g1db6e47e85
built on ubuntu 18.04 with clang-6 and UBSAN option.

Attachments (2)

gdb-swscale (33.6 KB ) - added by Suhwan 5 years ago.
mszh_rgb24.avi (254.0 KB ) - added by Suhwan 5 years ago.
poc

Download all attachments as: .zip

Change History (3)

by Suhwan, 5 years ago

Attachment: gdb-swscale added

by Suhwan, 5 years ago

Attachment: mszh_rgb24.avi added

poc

comment:1 by Carl Eugen Hoyos, 4 years ago

Component: undeterminedswscale
Priority: normalminor
Reproduced by developer: set
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.