summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec/ccodec_progressivedecoder.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-30 19:15:49 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-30 19:15:49 +0000
commit678f5418d36f553f4a908e51a3e5e3fcf5c66a16 (patch)
tree057d5cfaf46fba8c88c4c5eb0c9fa00c699874c0 /core/fxcodec/codec/ccodec_progressivedecoder.h
parente70aff80976ebe8b8a7bc24f2ed2115b681c33c2 (diff)
downloadpdfium-678f5418d36f553f4a908e51a3e5e3fcf5c66a16.tar.xz
Fix lifetime issue in CCodec_ProgressiveDecoder.
The associated bug is caused by failure to clean up context before returing at line 740 or so. But cleanups are fragile, so instead do not move context out of a local until success. This in turn means passing the local to one helper rather that using the stored value and confirming this is the only helper method invoked during the time in which the context is not yet stored. Bug: 879025 Change-Id: I1acb438edc28f7f4dd8acccc2461fe3a5ea7f5c8 Reviewed-on: https://pdfium-review.googlesource.com/41670 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/ccodec_progressivedecoder.h')
-rw-r--r--core/fxcodec/codec/ccodec_progressivedecoder.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/fxcodec/codec/ccodec_progressivedecoder.h b/core/fxcodec/codec/ccodec_progressivedecoder.h
index 4216a84a51..1f72d9f044 100644
--- a/core/fxcodec/codec/ccodec_progressivedecoder.h
+++ b/core/fxcodec/codec/ccodec_progressivedecoder.h
@@ -182,6 +182,7 @@ class CCodec_ProgressiveDecoder :
private:
#ifdef PDF_ENABLE_XFA_BMP
bool BmpReadMoreData(CCodec_BmpModule* pBmpModule,
+ CCodec_BmpModule::Context* pBmpContext,
FXCODEC_STATUS& err_status);
bool BmpDetectImageType(CFX_DIBAttribute* pAttribute, uint32_t size);
FXCODEC_STATUS BmpStartDecode(const RetainPtr<CFX_DIBitmap>& pDIBitmap);