Merge pull request #343 from huili2/cast_get_word
cast to uint32_t in GET_WORD to prevent possible left shift error.
This commit is contained in:
commit
6854e06796
@ -57,7 +57,7 @@ namespace WelsDec {
|
||||
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; \
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user