[poppler] poppler/GfxState.cc
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jan 8 13:02:53 UTC 2021
poppler/GfxState.cc | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 2308e6fbb6f5afa20bb59ef3378fdb63de74c436
Author: Albert Astals Cid <aacid at kde.org>
Date: Fri Jan 8 13:55:40 2021 +0100
Fix uninitialized memory read on broken files
oss-fuzz/10059
diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index 8a713d8c..fc411404 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -2932,6 +2932,11 @@ void GfxDeviceNColorSpace::getGray(const GfxColor *color, GfxGray *gray) const
void GfxDeviceNColorSpace::getRGB(const GfxColor *color, GfxRGB *rgb) const
{
+ if (unlikely(nComps < func->getInputSize() || alt->getNComps() > func->getOutputSize())) {
+ rgb->r = rgb->g = rgb->b = 0;
+ return;
+ }
+
double x[gfxColorMaxComps], c[gfxColorMaxComps];
GfxColor color2;
int i;
More information about the poppler
mailing list