Opened 5 years ago

Closed 4 years ago

#8167 closed defect (fixed)

left shift of negative value bugs in libavcodec/motion_est_template.c

Reported by: Suhwan Owned by:
Priority: normal 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're two left shift of negative value bugs in libavcodec/motion_est_template.c

libavcodec/motion_est_template.c:160:14: runtime error: left shift of negative value -1
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libavcodec/motion_est_template.c:160:14 in 
libavcodec/motion_est_template.c:161:14: runtime error: left shift of negative value -2
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libavcodec/motion_est_template.c:161:14 in 

How to reproduce:

% ./ffmpeg_g -t 2 -y -r 90 -i Freh7_B.264 -map 0 -vframes 120 -aframes 84 -r 79 -ab 847k -ac 12 -b:v 283k output/tmp.h261

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

Attachments (2)

gdb-motion (30.8 KB ) - added by Suhwan 5 years ago.
Freh7_B.264 (567.3 KB ) - added by Suhwan 5 years ago.
poc

Download all attachments as: .zip

Change History (3)

by Suhwan, 5 years ago

Attachment: gdb-motion added

by Suhwan, 5 years ago

Attachment: Freh7_B.264 added

poc

comment:1 by Carl Eugen Hoyos, 4 years ago

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