Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1487)

Unified Diff: core/src/fxcodec/codec/fx_codec_jpeg.cpp

Issue 1471913005: Merge to M47: Add a missing setjmp() to CCodec_JpegDecoder::v_GetNextLine(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@2526
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcodec/codec/fx_codec_jpeg.cpp
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
index 0a38fc82ca71c3c1396ed47c779b498ff63acd79..76096f36b592202e3f09b770cbbfe5ef23414ce0 100644
--- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
@@ -502,9 +502,13 @@ uint8_t* CCodec_JpegDecoder::v_GetNextLine() {
if (m_pExtProvider) {
return m_pExtProvider->GetNextLine(m_pExtContext);
}
+
+ if (setjmp(m_JmpBuf) == -1)
+ return nullptr;
+
int nlines = jpeg_read_scanlines(&cinfo, &m_pScanlineBuf, 1);
if (nlines < 1) {
- return NULL;
+ return nullptr;
}
return m_pScanlineBuf;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698