diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-01-30 17:38:00 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-30 17:38:00 +0000 |
commit | e563e8352139e4852a955e319023b09f2844aee9 (patch) | |
tree | a323757e674ebab8ee7da05c169435e1062d1c26 /core/fpdfapi/render | |
parent | 1917cdd8c90b977772cdee16cf496e56dce1a2ad (diff) | |
download | pdfium-e563e8352139e4852a955e319023b09f2844aee9.tar.xz |
Use UnownedPtr instead of T* in MaybeOwned.
Always check the liftime in the unowned case. Doing so unearthed
the following issues:
Transient lifetime issue in jbig2_image when doing realloc().
Stale (but unused) dictionary pointer in CPDF_Image.
Destruction order in error branch in cpdf_dibsource.cpp
Change-Id: I12b758aafeefedc7abe1e8b21a18db959929e95f
Reviewed-on: https://pdfium-review.googlesource.com/24552
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/render')
-rw-r--r-- | core/fpdfapi/render/cpdf_dibsource.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fpdfapi/render/cpdf_dibsource.cpp b/core/fpdfapi/render/cpdf_dibsource.cpp index aff63d102d..48715d2ecb 100644 --- a/core/fpdfapi/render/cpdf_dibsource.cpp +++ b/core/fpdfapi/render/cpdf_dibsource.cpp @@ -341,9 +341,9 @@ int CPDF_DIBSource::ContinueLoadDIBSource(IFX_PauseIndicator* pPause) { } if (iDecodeStatus < 0) { + m_pJbig2Context.reset(); m_pCachedBitmap.Reset(); m_pGlobalStream.Reset(); - m_pJbig2Context.reset(); return 0; } if (iDecodeStatus == FXCODEC_STATUS_DECODE_TOBECONTINUE) |