[colord] cd_edid_parse_string uses only the first 12 bytes

Richard Hughes hughsient at gmail.com
Fri Mar 28 01:03:41 PDT 2014


On 28 March 2014 07:35, Florian Höch <lists+colord at hoech.org> wrote:
> I noticed colord is just using the first 12 bytes of EDID strings
> (cd-edid.c, in cd_edid_parse_string) while the spec allows up to 13,
> which in some cases can lead to (e.g.) truncated ASCII serial.

Ohh, I thought it was 12 plus \0 -- if it's 13 chars then please fix in git.

> Is this
> worth fixing, or would it cause problems with existing things (profile
> to device mapping comes to mind)?

I think it's better to be correct in this case.

> (Basically I have some EDID parsing code of my own which I'd like to
> match what colord is doing, so another thing that I could do is simply
> also truncate to 12 bytes if fixing this in colord would cause headaches)

Lets go 13 bytes -- we can also do a fallback inside to colord if any
bugs come in.

Richard


More information about the colord mailing list