diff options
-rw-r--r-- | core/fxcodec/jbig2/JBig2_HuffmanTable.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/fxcodec/jbig2/JBig2_HuffmanTable.cpp b/core/fxcodec/jbig2/JBig2_HuffmanTable.cpp index 3bb6ae620c..a4998e99cf 100644 --- a/core/fxcodec/jbig2/JBig2_HuffmanTable.cpp +++ b/core/fxcodec/jbig2/JBig2_HuffmanTable.cpp @@ -70,6 +70,10 @@ bool CJBig2_HuffmanTable::ParseFromCodedBuffer(CJBig2_BitStream* pStream) { return false; } RANGELOW[NTEMP] = cur_low.ValueOrDie(); + + if (RANGELEN[NTEMP] >= 32) + return false; + cur_low += (1 << RANGELEN[NTEMP]); if (!cur_low.IsValid()) return false; |