[cups.bugs] [MOD] STR #3901: imagetops outputs a wrong image when input image is larger than RIPCache
Koji Otani
sho at bbr.jp
Thu Jul 28 02:40:49 PDT 2011
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
imagetops outputs a wrong image when input image is larger than RIPCache.
This is because cachefile handling is wrong in filter/image.c.
It creates cachefile in flush_tile in image.c only if img->cachefile < 0
as follows.
-----
if (img->cachefile < 0)
{
if ((img->cachefile = cupsTempFd(img->cachename,
sizeof(img->cachename))) < 0)
{
....
-----
But img->cachefile is intialized to 0 in cupsImageOpen as follows.
----
img = calloc(sizeof(cups_image_t), 1);
----
And it's never set to a minus value.
So cachefile is not created even when RIPCache is overflow.
I think that img->cachefile should be intialized to a minus value as
follows.
----
img = calloc(sizeof(cups_image_t), 1);
img->cachefile = -1;
---------
Link: http://www.cups.org/str.php?L3901
Version: 1.5rc1
More information about the cups-devel
mailing list