Sign Up
Log In
Sign Up
Username:
*
Email:
*
Password:
*
Password confirmation:
*
or
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Games:steam:SLE-15-SP3
poppler
poppler-CVE-2024-56378.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File poppler-CVE-2024-56378.patch of Package poppler
Index: poppler-0.79.0/poppler/JBIG2Stream.cc =================================================================== --- poppler-0.79.0.orig/poppler/JBIG2Stream.cc +++ poppler-0.79.0/poppler/JBIG2Stream.cc @@ -858,7 +858,7 @@ void JBIG2Bitmap::duplicateRow(int yDest void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp) { - int x0, x1, y0, y1, xx, yy; + int x0, x1, y0, y1, xx, yy, yyy; unsigned char *srcPtr, *destPtr; unsigned int src0, src1, src, dest, s1, s2, m1, m2, m3; bool oneByte; @@ -903,13 +903,16 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *b oneByte = x0 == ((x1 - 1) & ~7); for (yy = y0; yy < y1; ++yy) { - if (unlikely((y + yy >= h) || (y + yy < 0))) + if (unlikely(checkedAdd(y, yy, &yyy))) { + continue; + } + if (unlikely((yyy >= h) || (yyy < 0))) continue; // one byte per line -- need to mask both left and right side if (oneByte) { if (x >= 0) { - destPtr = data + (y + yy) * line + (x >> 3); + destPtr = data + yyy * line + (x >> 3); srcPtr = bitmap->data + yy * bitmap->line; dest = *destPtr; src1 = *srcPtr; @@ -932,7 +935,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *b } *destPtr = dest; } else { - destPtr = data + (y + yy) * line; + destPtr = data + yyy * line; srcPtr = bitmap->data + yy * bitmap->line + (-x >> 3); dest = *destPtr; src1 = *srcPtr; @@ -962,7 +965,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *b // left-most byte if (x >= 0) { - destPtr = data + (y + yy) * line + (x >> 3); + destPtr = data + yyy * line + (x >> 3); srcPtr = bitmap->data + yy * bitmap->line; src1 = *srcPtr++; dest = *destPtr; @@ -986,7 +989,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *b *destPtr++ = dest; xx = x0 + 8; } else { - destPtr = data + (y + yy) * line; + destPtr = data + yyy * line; srcPtr = bitmap->data + yy * bitmap->line + (-x >> 3); src1 = *srcPtr++; xx = x0;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Contact
Support
@OBShq
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor