edid: ignore unsupported/malformed DisplayID extension blocks

Some EDIDs have DisplayID 2 extension blocks which we don't support
at the moment. Skip the extension block in that case. While at it,
also skip malformed DisplayID blocks.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/emersion/libdisplay-info/-/issues/42
This commit is contained in:
Simon Ser 2024-04-29 11:09:25 +02:00
parent 7067ab6ad1
commit 204576ecff

2
edid.c
View file

@ -1176,7 +1176,7 @@ parse_ext(struct di_edid *edid, const uint8_t data[static EDID_BLOCK_SIZE])
if (!_di_displayid_parse(&ext->displayid, &data[1],
EDID_BLOCK_SIZE - 2, &logger)) {
free(ext);
return false;
return errno == ENOTSUP || errno == EINVAL;
}
break;
default: