<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 - [patch] fix uninitialized variable in Splash::pipeRun(SplashPipe*) (Splash.cc:470)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89200">89200</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[patch] fix uninitialized variable in Splash::pipeRun(SplashPipe*) (Splash.cc:470)
</td>
</tr>
<tr>
<th>Product</th>
<td>poppler
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>splash backend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>poppler-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>williambader@hotmail.com
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=113598" name="attach_113598" title="provisional patch">attachment 113598</a> <a href="attachment.cgi?id=113598&action=edit" title="provisional patch">[details]</a></span>
provisional patch
Running pdftops with the PDF in
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - [PATCH] Add a pdftops -preservecolorspace option to suppress optimization to DeviceRGB color space"
href="show_bug.cgi?id=88971">https://bugs.freedesktop.org/show_bug.cgi?id=88971</a> produces valgrind errors.
Line 470 of Splash.cc in Splash::pipeRun() has the test
if (pipe->shape && state->blendFunc && pipe->knockout && alpha0Bitmap != NULL)
but in some paths, pipe->shape is uninitialized because Splash::pipeInit() does
not initialize it and then valgrind complains:
Conditional jump or move depends on uninitialised value(s)
at 0x4BF0E5: Splash::pipeRun(SplashPipe*) (Splash.cc:470)
by 0x4CD84F: Splash::blitImage(SplashBitmap*, bool, int, int, SplashClipResult)
(Splash.cc:5109)
by 0x4CE0BA: Splash::drawImage(bool (*)(void*, unsigned char*, unsigned char*),
void*, SplashColorMode, bool, int, int, double*, bool, bool) (Splash.cc:3752)
I think that the best is to initialize it in pipeInit(), but I am not sure if
something depends on having pipeInit() leave it alone, so the attached patch
just initializes shape to 0 in a few places where it could be used
uninitialized.
Possibly the test at line 470 should use pipe->usesShape instead pipe->shape or
test pipe->shape after testing that alpha0Bitmap is not NULL.</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>