[FFmpeg-devel] [PATCH]lavc/motion_est: Fix undefined negative left shifts

Michael Niedermayer michael at niedermayer.cc
Tue Apr 18 17:28:25 EEST 2017


On Tue, Apr 18, 2017 at 11:04:34AM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch fixes the following ubsan errors:
> libavcodec/motion_est.c:959:42: runtime error: left shift of negative 
> value -16
> libavcodec/motion_est.c:960:42: runtime error: left shift of negative 
> value -16
> 
> I do not have a testcase for lines 961f.
> 
> Please comment, Carl Eugen

>  motion_est.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 835e20f48e7c0b1df3bdba09f3723e21a4cfd155  0001-lavc-motion_est-Fix-undefined-negative-left-shifts.patch
> From 4dd1b8d61c5dd2e77b7c855a1d2acf7d90277daf Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <cehoyos at ag.or.at>
> Date: Tue, 18 Apr 2017 11:02:30 +0200
> Subject: [PATCH] lavc/motion_est: Fix undefined negative left shifts.

LGTM

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170418/1de3579d/attachment.sig>


More information about the ffmpeg-devel mailing list