<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - use-of-uninitialized-value in GfxDeviceRGBColorSpace::getRGB"
href="https://bugs.freedesktop.org/show_bug.cgi?id=106072">106072</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>use-of-uninitialized-value in GfxDeviceRGBColorSpace::getRGB
</td>
</tr>
<tr>
<th>Product</th>
<td>poppler
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86 (IA32)
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>minor
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Assignee</th>
<td>poppler-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>pdknsk@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>The code is as follows.
double c[gfxColorMaxComps]; // 32
...
func->transform(&x, c); // sets c[0] only
for (i = 0; i < alt->getNComps(); ++i) { // 3
color2.c[i] = dblToCol(c[i]); // reads c[1], c[2]
}
alt->getRGB(&color2, rgb); // uses c[1]
And the report.
==10363==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x1525417 in clip01(int) poppler/poppler/GfxState_helpers.h:26:10
#1 0x153286c in GfxDeviceRGBColorSpace::getRGB(GfxColor*, GfxRGB*)
poppler/poppler/GfxState.cc:984:12
#2 0x1571f27 in GfxSeparationColorSpace::getRGB(GfxColor*, GfxRGB*)
poppler/poppler/GfxState.cc:2818:10
#3 0x18788b0 in GfxState::getStrokeRGB(GfxRGB*)
poppler/poppler/GfxState.h:1471:25
#4 0x1b7105b in SplashOutputDev::updateStrokeColor(GfxState*)
poppler/poppler/SplashOutputDev.cc:1727:12
#5 0x13dd6ec in Gfx::opSetStrokeColorSpace(Object*, int)
poppler/poppler/Gfx.cc:1550:10
#6 0x144079a in Gfx::execOp(Object*, Object*, int)
poppler/poppler/Gfx.cc:884:3
#7 0x143c5bf in Gfx::go(bool) poppler/poppler/Gfx.cc:747:7
#8 0x143ab18 in Gfx::display(Object*, bool) poppler/poppler/Gfx.cc:709:3
#9 0x16e5ff1 in Page::displaySlice(OutputDev*, double, double, int, bool,
bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*,
void*), void*, bool) poppler/poppler/Page.cc:560:10
#10 0x110f743 in PDFDoc::displayPageSlice(OutputDev*, int, double, double,
int, bool, bool, bool, int, int, int, int, bool (*)(void*), void*, bool
(*)(Annot*, void*), void*, bool) poppler/poppler/PDFDoc.cc:550:20
#11 0x1b4b1ab in poppler::page_renderer::render_page(poppler::page const*,
double, double, int, int, int, int, poppler::rotation_enum) const
poppler/cpp/poppler-page-renderer.cpp:180:13
Uninitialized value was stored to memory at
#0 0x152e951 in dblToCol(double) poppler/poppler/GfxState.h:107
#1 0x1571c16 in GfxSeparationColorSpace::getRGB(GfxColor*, GfxRGB*)
poppler/poppler/GfxState.cc:2816:21
#2 0x18788b0 in GfxState::getStrokeRGB(GfxRGB*)
poppler/poppler/GfxState.h:1471:25
#3 0x1b7105b in SplashOutputDev::updateStrokeColor(GfxState*)
poppler/poppler/SplashOutputDev.cc:1727:12
#4 0x13dd6ec in Gfx::opSetStrokeColorSpace(Object*, int)
poppler/poppler/Gfx.cc:1550:10
#5 0x144079a in Gfx::execOp(Object*, Object*, int)
poppler/poppler/Gfx.cc:884:3
#6 0x143c5bf in Gfx::go(bool) poppler/poppler/Gfx.cc:747:7
#7 0x143ab18 in Gfx::display(Object*, bool) poppler/poppler/Gfx.cc:709:3
#8 0x16e5ff1 in Page::displaySlice(OutputDev*, double, double, int, bool,
bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*,
void*), void*, bool) poppler/poppler/Page.cc:560:10
#9 0x110f743 in PDFDoc::displayPageSlice(OutputDev*, int, double, double,
int, bool, bool, bool, int, int, int, int, bool (*)(void*), void*, bool
(*)(Annot*, void*), void*, bool) poppler/poppler/PDFDoc.cc:550:20
#10 0x1b4b1ab in poppler::page_renderer::render_page(poppler::page const*,
double, double, int, int, int, int, poppler::rotation_enum) const
poppler/cpp/poppler-page-renderer.cpp:180:13
Uninitialized value was created by an allocation of 'c' in the stack frame of
function '_ZN23GfxSeparationColorSpace6getRGBEP8GfxColorP6GfxRGB'
#0 0x1570840 in GfxSeparationColorSpace::getRGB(GfxColor*, GfxRGB*)
poppler/poppler/GfxState.cc:2802</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>