diff options
author | Lei Zhang <thestig@chromium.org> | 2017-08-01 11:08:33 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-01 21:32:01 +0000 |
commit | 1c5d8504ed38dbf19ae4dee04360cf0893cdb18f (patch) | |
tree | ba6378465e4f0659b023e8e2674fb2ba447e0d45 /core/fpdfapi/parser/cpdf_parser.h | |
parent | 04f736099c065d83193d2ceeccd6d125d7fe789d (diff) | |
download | pdfium-1c5d8504ed38dbf19ae4dee04360cf0893cdb18f.tar.xz |
Change CPDF_Parser::GetIndirectBinary() to return a std::vector.
Fixes potential leaks in CPDF_Creator::WriteOldIndirectObject(), the
only caller.
Change-Id: I8a20da8a555c8d28f3bcd467a193a6a81c9f91d9
Reviewed-on: https://pdfium-review.googlesource.com/9751
Reviewed-by: Art Snake <art-snake@yandex-team.ru>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_parser.h')
-rw-r--r-- | core/fpdfapi/parser/cpdf_parser.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fpdfapi/parser/cpdf_parser.h b/core/fpdfapi/parser/cpdf_parser.h index 3acdbbfa6f..4d78d7052f 100644 --- a/core/fpdfapi/parser/cpdf_parser.h +++ b/core/fpdfapi/parser/cpdf_parser.h @@ -91,7 +91,7 @@ class CPDF_Parser { FX_FILESIZE GetObjectOffset(uint32_t objnum) const; FX_FILESIZE GetObjectSize(uint32_t objnum) const; - void GetIndirectBinary(uint32_t objnum, uint8_t*& pBuffer, uint32_t& size); + std::vector<uint8_t> GetIndirectBinary(uint32_t objnum); int GetFileVersion() const { return m_FileVersion; } bool IsXRefStream() const { return m_bXRefStream; } |