shithub: libvpx

Download patch

ref: 301e34527307690e66ac53f37022002c97e3af0d
parent: ba8651d474d09bead393cc81b139607210374bb8
author: Yaowu Xu <[email protected]>
date: Wed May 25 10:02:22 EDT 2016

Convert to unsigned int before left shift

This is to fix overflow when 128 is left shifted by 24.

Change-Id: Ibb5f6813536d985afa003a9848c0c3dd358955a7

--- a/vpx_ports/mem_ops.h
+++ b/vpx_ports/mem_ops.h
@@ -89,7 +89,7 @@
   unsigned MEM_VALUE_T  val;
   const MAU_T          *mem = (const MAU_T *)vmem;
 
-  val = mem[0] << 24;
+  val = ((unsigned int)mem[0]) << 24;
   val |= mem[1] << 16;
   val |= mem[2] << 8;
   val |= mem[3];