Request for backport.

Denis Lila dlila at
Mon Dec 20 08:19:53 PST 2010

----- Original Message -----
> Hi.
> I would like to backport 6800846:
> It would fix RH662230.
> ChangeLog:
> +2010-12-20 Denis Lila <dlila at>
> +
> + Backport S6800846.
> + * NEWS: Updated with fixes.
> + * Apply patch.
> + * patches/openjdk/6800846-printing-quality.patch: New file. Backport
> + of S6795356, and fix for RH662230.
> +
> Can I push?
> Thank you,
> Denis.

The sun bug description says that this is a regression in
indexed image quality, but the RH bug is an OOB exception.
This is a bit strange, so I should probably explain what's going
on and why the patch fixes both problems: the function initCubemap,
given an array of colours, cmap, of length 256, but where
only the first cmap_len values are valid, it is supposed to
initialize and return an array char[cube_dim][cube_dim][cube_dim]
(call this INV) that is the inverse of cmap. In other words
cmap[i] is the ith colour, but INV[cmap[i]] is supposed to be i
(it's actually a bit more complicated, but this is basically it).

The problem is that without this patch, this function is
blatantly ignoring its second argument cmap_len that tells it
the true length of the cmap array, and so it ends up initializing
some of the values in INV to indices outside of the [0,cmap_len-1]
range, and when we try to take cmap[INV[rgb]], this causes the
OOB exception (possibly even segfaults and crashes if this is ever
done in native code). The patch obviously fixes this problem because
it doesn't initialize any of the INV entries to anything out of
the valid range.


More information about the distro-pkg-dev mailing list