Commit 12af46b649fdb946bacf150428e5cdfc3470a7ca

Alexei Podtelezhnikov 2019-07-23T22:38:30

* src/base/ftbbox.c (cubic_peak): Sanitize left shift (#56586).

diff --git a/ChangeLog b/ChangeLog
index 0229dce..aea6278 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2019-06-26  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	* src/base/ftbbox.c (cubic_peak): Sanitize left shift (#56586).
+
 2019-07-22  Weiyi Wu  <w1w2y3@gmail.com>
 
 	* src/cid/cidload.c (cid_hex_to_binary): Fix typo (#56653).
diff --git a/src/base/ftbbox.c b/src/base/ftbbox.c
index a0b2c46..b70062c 100644
--- a/src/base/ftbbox.c
+++ b/src/base/ftbbox.c
@@ -294,10 +294,10 @@
       if ( shift > 2 )
         shift = 2;
 
-      q1 <<=  shift;
-      q2 <<=  shift;
-      q3 <<=  shift;
-      q4 <<=  shift;
+      q1 *= 1 << shift;
+      q2 *= 1 << shift;
+      q3 *= 1 << shift;
+      q4 *= 1 << shift;
     }
     else
     {