From 3943c3ec08fd733441e69bf30227f9130a3e1b14 Mon Sep 17 00:00:00 2001 From: Luis de Bethencourt Date: Sun, 27 Apr 2014 18:29:11 -0400 Subject: [PATCH] goom: fix undefined behaviour of left-shift Don't left-shift into the sign bit, the result is undefined and potentially an overflow could flip the sign. --- gst/goom/filters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/goom/filters.c b/gst/goom/filters.c index b1584f11ed..338070cee3 100644 --- a/gst/goom/filters.c +++ b/gst/goom/filters.c @@ -731,7 +731,7 @@ generatePrecalCoef (int precalCoef[16][16]) if (!(coefh || coefv)) { i = 255; } else { - int i1, i2, i3, i4; + uint i1, i2, i3, i4; i1 = diffcoeffh * diffcoeffv; i2 = coefh * diffcoeffv;