shithub: openh264

Download patch

ref: d5e0b9937285e3632f096e17c126193e6725dd55
parent: c9a25e949479f7b7dc732706bedd28dbbf47017f
author: Licai Guo <guolicai@gmail.com>
date: Sun Feb 23 17:22:13 EST 2014

cast to uint32_t in GET_WORD to prevent possible left shift error.

--- a/codec/decoder/core/inc/dec_golomb.h
+++ b/codec/decoder/core/inc/dec_golomb.h
@@ -57,7 +57,7 @@
   if (iReadBytes > iAllowedBytes+1) { \
     return ERR_INFO_READ_OVERFLOW; \
   } \
-	iCurBits |= ((pBufPtr[0] << 8) | pBufPtr[1]) << (iLeftBits); \
+	iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
 	iLeftBits -= 16; \
 	pBufPtr +=2; \
 }