summaryrefslogtreecommitdiff
path: root/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-12-07 12:10:20 -0800
committerCommit bot <commit-bot@chromium.org>2016-12-07 12:10:20 -0800
commit7cda31ac2f2884166f044937619478a6103198cf (patch)
tree640f14ab5c81696cfffdedf0644eac4b1f2bc47f /testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc
parentab5a20d9de8c801b8376bfe2d6f7cf9ac7d26028 (diff)
downloadpdfium-7cda31ac2f2884166f044937619478a6103198cf.tar.xz
Refcount IFGAS_ streams all the time, too
IFGAS_Streams are not part of the IFX_Stream hierarchy, but can be made from such. Review-Url: https://codereview.chromium.org/2559763002
Diffstat (limited to 'testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc')
-rw-r--r--testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc b/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc
index 94decbfc2c..d99457d360 100644
--- a/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc
+++ b/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc
@@ -4,6 +4,7 @@
#include <memory>
+#include "core/fxcrt/cfx_retain_ptr.h"
#include "xfa/fde/xml/cfx_saxreader.h"
#include "xfa/fgas/crt/fgas_stream.h"
#include "xfa/fxfa/parser/cxfa_widetextread.h"
@@ -11,8 +12,7 @@
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
CFX_WideString input = CFX_WideString::FromUTF8(
CFX_ByteStringC(data, static_cast<FX_STRSIZE>(size)));
- std::unique_ptr<IFGAS_Stream, ReleaseDeleter<IFGAS_Stream>> stream(
- new CXFA_WideTextRead(input));
+ auto stream = pdfium::MakeRetain<CXFA_WideTextRead>(input);
if (!stream)
return 0;