summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/fpdf_parser_decode.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-09-11 07:57:48 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-09-11 07:57:48 +0000
commit8365e76fe8a311eaf77c4b5d5c0b199de0238f07 (patch)
treec30b4fc3079c254432e120d211933ba89c80f69e /core/fpdfapi/parser/fpdf_parser_decode.h
parent8550a2d1e037ef444e8ac340ea70001c7a25091c (diff)
downloadpdfium-8365e76fe8a311eaf77c4b5d5c0b199de0238f07.tar.xz
Make HexDecode()'s buffer out parameter a unique_ptr.
Do the same for A85Decode(). Change-Id: Ic6a0e5e8a63defa104e35e97eb9ce4223aac23a7 Reviewed-on: https://pdfium-review.googlesource.com/41851 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/fpdf_parser_decode.h')
-rw-r--r--core/fpdfapi/parser/fpdf_parser_decode.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fpdfapi/parser/fpdf_parser_decode.h b/core/fpdfapi/parser/fpdf_parser_decode.h
index 1484dd7cf0..eb7beaccdf 100644
--- a/core/fpdfapi/parser/fpdf_parser_decode.h
+++ b/core/fpdfapi/parser/fpdf_parser_decode.h
@@ -9,6 +9,7 @@
#include <memory>
+#include "core/fxcrt/fx_memory.h"
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/unowned_ptr.h"
#include "third_party/base/span.h"
@@ -51,11 +52,11 @@ uint32_t RunLengthDecode(pdfium::span<const uint8_t> src_span,
uint32_t* dest_size);
uint32_t A85Decode(pdfium::span<const uint8_t> src_span,
- uint8_t** dest_buf,
+ std::unique_ptr<uint8_t, FxFreeDeleter>* dest_buf,
uint32_t* dest_size);
uint32_t HexDecode(pdfium::span<const uint8_t> src_span,
- uint8_t** dest_buf,
+ std::unique_ptr<uint8_t, FxFreeDeleter>* dest_buf,
uint32_t* dest_size);
uint32_t FlateOrLZWDecode(bool bLZW,