diff options
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_TrdProc.cpp')
-rw-r--r-- | core/fxcodec/jbig2/JBig2_TrdProc.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/core/fxcodec/jbig2/JBig2_TrdProc.cpp b/core/fxcodec/jbig2/JBig2_TrdProc.cpp index 4f082f376f..7aa5989972 100644 --- a/core/fxcodec/jbig2/JBig2_TrdProc.cpp +++ b/core/fxcodec/jbig2/JBig2_TrdProc.cpp @@ -57,7 +57,7 @@ std::unique_ptr<CJBig2_Image> CJBig2_TRDProc::DecodeHuffman( SBREG->Fill(SBDEFPIXEL); int32_t INITIAL_STRIPT; auto pHuffmanDecoder = pdfium::MakeUnique<CJBig2_HuffmanDecoder>(pStream); - if (pHuffmanDecoder->DecodeAValue(SBHUFFDT, &INITIAL_STRIPT) != 0) + if (pHuffmanDecoder->DecodeAValue(SBHUFFDT.Get(), &INITIAL_STRIPT) != 0) return nullptr; FX_SAFE_INT32 STRIPT = INITIAL_STRIPT; @@ -67,7 +67,7 @@ std::unique_ptr<CJBig2_Image> CJBig2_TRDProc::DecodeHuffman( uint32_t NINSTANCES = 0; while (NINSTANCES < SBNUMINSTANCES) { int32_t INITIAL_DT; - if (pHuffmanDecoder->DecodeAValue(SBHUFFDT, &INITIAL_DT) != 0) + if (pHuffmanDecoder->DecodeAValue(SBHUFFDT.Get(), &INITIAL_DT) != 0) return nullptr; FX_SAFE_INT32 DT = INITIAL_DT; @@ -78,7 +78,7 @@ std::unique_ptr<CJBig2_Image> CJBig2_TRDProc::DecodeHuffman( for (;;) { if (bFirst) { int32_t DFS; - if (pHuffmanDecoder->DecodeAValue(SBHUFFFS, &DFS) != 0) + if (pHuffmanDecoder->DecodeAValue(SBHUFFFS.Get(), &DFS) != 0) return nullptr; FIRSTS += DFS; @@ -86,7 +86,7 @@ std::unique_ptr<CJBig2_Image> CJBig2_TRDProc::DecodeHuffman( bFirst = false; } else { int32_t IDS; - int32_t nVal = pHuffmanDecoder->DecodeAValue(SBHUFFDS, &IDS); + int32_t nVal = pHuffmanDecoder->DecodeAValue(SBHUFFDS.Get(), &IDS); if (nVal == JBIG2_OOB) break; @@ -147,11 +147,12 @@ std::unique_ptr<CJBig2_Image> CJBig2_TRDProc::DecodeHuffman( int32_t RDXI; int32_t RDYI; int32_t HUFFRSIZE; - if ((pHuffmanDecoder->DecodeAValue(SBHUFFRDW, &RDWI) != 0) || - (pHuffmanDecoder->DecodeAValue(SBHUFFRDH, &RDHI) != 0) || - (pHuffmanDecoder->DecodeAValue(SBHUFFRDX, &RDXI) != 0) || - (pHuffmanDecoder->DecodeAValue(SBHUFFRDY, &RDYI) != 0) || - (pHuffmanDecoder->DecodeAValue(SBHUFFRSIZE, &HUFFRSIZE) != 0)) { + if ((pHuffmanDecoder->DecodeAValue(SBHUFFRDW.Get(), &RDWI) != 0) || + (pHuffmanDecoder->DecodeAValue(SBHUFFRDH.Get(), &RDHI) != 0) || + (pHuffmanDecoder->DecodeAValue(SBHUFFRDX.Get(), &RDXI) != 0) || + (pHuffmanDecoder->DecodeAValue(SBHUFFRDY.Get(), &RDYI) != 0) || + (pHuffmanDecoder->DecodeAValue(SBHUFFRSIZE.Get(), &HUFFRSIZE) != + 0)) { return nullptr; } pStream->alignByte(); |