| Index: core/fpdfapi/page/cpdf_streamparser.cpp
|
| diff --git a/core/fpdfapi/page/cpdf_streamparser.cpp b/core/fpdfapi/page/cpdf_streamparser.cpp
|
| index 2c2be0bd2749b1e9d0c1cdc628dec46cb7a2cae7..4cdb942959028ab3293ee9d81eac937707a8abab 100644
|
| --- a/core/fpdfapi/page/cpdf_streamparser.cpp
|
| +++ b/core/fpdfapi/page/cpdf_streamparser.cpp
|
| @@ -230,7 +230,7 @@ CPDF_Stream* CPDF_StreamParser::ReadInlineStream(CPDF_Document* pDoc,
|
| FXSYS_memcpy(pData, m_pBuf + m_Pos, dwStreamSize);
|
| m_Pos += dwStreamSize;
|
| }
|
| - pDict->SetIntegerFor("Length", (int)dwStreamSize);
|
| + pDict->SetNewFor<CPDF_Number>("Length", (int)dwStreamSize);
|
| return new CPDF_Stream(pData, dwStreamSize, pDict);
|
| }
|
|
|
| @@ -361,16 +361,13 @@ CPDF_Object* CPDF_StreamParser::ReadNextObject(bool bAllowNestedArray,
|
|
|
| CFX_ByteString key =
|
| PDF_NameDecode(CFX_ByteStringC(m_WordBuffer + 1, m_WordSize - 1));
|
| - CPDF_Object* pObj = ReadNextObject(true, 0);
|
| + auto pObj = pdfium::WrapUnique(ReadNextObject(true, 0));
|
| if (!pObj) {
|
| delete pDict;
|
| return nullptr;
|
| }
|
| -
|
| - if (key.IsEmpty())
|
| - delete pObj;
|
| - else
|
| - pDict->SetFor(key, pObj);
|
| + if (!key.IsEmpty())
|
| + pDict->SetFor(key, std::move(pObj));
|
| }
|
| return pDict;
|
| }
|
|
|