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

Unified Diff: core/fxcodec/jbig2/JBig2_Image.cpp

Issue 2222843004: Check if image width or height are zero before proceeding. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 4 months 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/fxcodec/jbig2/JBig2_Image.cpp
diff --git a/core/fxcodec/jbig2/JBig2_Image.cpp b/core/fxcodec/jbig2/JBig2_Image.cpp
index b8cb21165bd6e64f9799aa6c232770bbcefed17a..2071221cd1e5116da17f0959cf4fa1afa0b1cff2 100644
--- a/core/fxcodec/jbig2/JBig2_Image.cpp
+++ b/core/fxcodec/jbig2/JBig2_Image.cpp
@@ -23,7 +23,7 @@ CJBig2_Image::CJBig2_Image(int32_t w, int32_t h)
m_nHeight(0),
m_nStride(0),
m_bOwnsBuffer(true) {
- if (w < 0 || h < 0 || w > kMaxImagePixels)
+ if (w <= 0 || h <= 0 || w > kMaxImagePixels)
return;
int32_t stride_pixels = (w + 31) & ~31;
« 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