[PATCH xorg-server] Fix xf86EdidModes.c: array subscript is above array bounds
Peter Hutterer
peter.hutterer at who-t.net
Thu Jul 5 17:45:54 PDT 2012
On Thu, Jul 05, 2012 at 04:37:39PM -0700, Keith Packard wrote:
> Torsten Kaiser <just.for.lkml at googlemail.com> writes:
>
> > With this optimization level gcc notices, that the loop in function
> > DDCModesFromEstIII() would go until i=5 and j=1 which would result in
> > m = (5 * 8) + (7 - 1) = 46, but the array EstIIIModes[] only contains
> > 44 elements.
>
> I'd like Adam's opinion; he wrote the original code and is the best
> person to verify that this does what the spec requires. On the face of
> it, it looks right to me though...
I'm not a big fan of fixing two separate bugs in one patches though, I'd
prefer to split out the out-of-bounds from the skipping last mode issue.
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net> otherwise
Cheers,
Peter
More information about the xorg-devel
mailing list