diff options
author | Artem Strygin <art-snake@yandex-team.ru> | 2017-09-04 17:01:41 +0300 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-05 16:04:08 +0000 |
commit | 4fde70e28c6aff85ad30a958823e658678f5cfb6 (patch) | |
tree | baaeb84083b6f245940f58ae2331ee08aad0527e /core/fpdfapi/parser/cpdf_stream.h | |
parent | 16b77c7176313531609a3a062d286f555c4710a1 (diff) | |
download | pdfium-4fde70e28c6aff85ad30a958823e658678f5cfb6.tar.xz |
Fix length field in dictionary on create stream
The CPDF_stream constructors were not setting the "Length" into the stream dictionary.
The "Length" was being set by the SetData methods.
This CL fixes the constructor to properly set the "Length" field.
Change-Id: Iee1bd7f7a096d415ab01ee3d2f3416e19e87ece9
Reviewed-on: https://pdfium-review.googlesource.com/13010
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_stream.h')
-rw-r--r-- | core/fpdfapi/parser/cpdf_stream.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_stream.h b/core/fpdfapi/parser/cpdf_stream.h index 1dbbd0343e..3c3b674a48 100644 --- a/core/fpdfapi/parser/cpdf_stream.h +++ b/core/fpdfapi/parser/cpdf_stream.h @@ -41,6 +41,7 @@ class CPDF_Stream : public CPDF_Object { // Does not takes ownership of |pData|, copies into internally-owned buffer. void SetData(const uint8_t* pData, uint32_t size); + void SetData(std::unique_ptr<uint8_t, FxFreeDeleter> pData, uint32_t size); void SetData(std::ostringstream* stream); // Set data and remove "Filter" and "DecodeParms" fields from stream // dictionary. |