[argyllcms] Re: [PATCH] Argyll segfaults with 256 byte EDID

  • From: Graeme Gill <graeme@xxxxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Mon, 29 Jun 2009 23:38:18 +1000

Omari Stephens wrote:
I upgraded a bunch of X-related stuff (including libraries), and now dispwin sefaults on start. I tracked the issue down to this:

(gdb) frame
#0  get_a_display (ix=0) at spectro/dispwin.c:994
994 if ((rv->edid = malloc(sizeof(unsigned char) * 128)) == NULL) {
(gdb) p (*paths[i]).edid_len
$55 = 256

As expected, changing the 128 to 256 on lines 994 and 3242 fixes the problem. Doing a recursive grep for '[(]unsigned char[)] \* 128' suggests that these are the only instances of this specific problem.

Thanks, yes it's a bug. The fix should be to replace 128 with the
appropriate (source) edid_len rather than 256.

dispwin.h seems to suggest that this should be supported, so I presume these lines should have been changed at some point in the past but weren't; maybe this value should be in a constant somewhere?

I implemented part of it, but forgot about the copy.

Graeme Gill.

Other related posts: