From 31815bd66e1ee43901ee990a843937d2f471905d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Fri, 5 Aug 2022 12:45:52 +0200 Subject: [PATCH] main: limit EDID length to 256 bytes --- main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 1b99168..ac9d9a3 100644 --- a/main.c +++ b/main.c @@ -378,7 +378,10 @@ i2c_end: softi2c_master_stop(); if (0 == i2c_rc) { puts("success\r\n"); - const uint16_t edid_len = edid_length(edid_sink); // get length + uint16_t edid_len = edid_length(edid_sink); // get length + if (edid_len > 256) { // we only support up to one extension + edid_len = 256; + } if (edid_len) { // EDID is valid edid_modify(edid_sink); // modify EDID to include firewall indication // compare saved/source and sink EDID