Fix an endless loop in CJBig2_HuffmanTable::parseFromCodedBuffer
authorJUN FANG <jun_fang@foxitsoftware.com>
Thu, 21 May 2015 16:56:11 +0000 (09:56 -0700)
committerJUN FANG <jun_fang@foxitsoftware.com>
Thu, 21 May 2015 16:56:11 +0000 (09:56 -0700)
commitbc4b82ea7a9c6603c6a1c89e00f4e6381c1b6804
tree1151fbe2fef562cd7589949b67c83cbe08d504e3
parent79569e74ddddb12b3a76d211d826be2a3d87d0d0
Fix an endless loop in CJBig2_HuffmanTable::parseFromCodedBuffer

This issue is trigged by the conversion from unsigned int to signed int.
A large unsigned int is converted to int. It's represented as a negative
int which is used in the condition of while later.

BUG=482639
R=brucedawson@chromium.org

Review URL: https://codereview.chromium.org/1146913003
core/src/fxcodec/jbig2/JBig2_HuffmanTable.cpp