This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:
Subject: edid-decode: fix heap overread on early EOF Author: Maciej Miszczyk <mmiszc...@logitech.com> Date: Fri Dec 13 14:02:21 2024 +0100 Fix heap overread on early EOF. Signed-off-by: Maciej Miszczyk <mmiszc...@logitech.com> Signed-off-by: Hans Verkuil <hverk...@xs4all.nl> utils/edid-decode/edid-decode.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=4ac410cd2bfbaf1b3f2202a6015260f7e2e18f70 diff --git a/utils/edid-decode/edid-decode.cpp b/utils/edid-decode/edid-decode.cpp index 25d872a3958f..b75b4a521f6b 100644 --- a/utils/edid-decode/edid-decode.cpp +++ b/utils/edid-decode/edid-decode.cpp @@ -1113,8 +1113,9 @@ static bool extract_edid(int fd, FILE *error) unsigned i; /* Is the EDID provided in hex? */ - for (i = 0; i < 32 && (isspace(data[i]) || strchr(ignore_chars, data[i]) || - tolower(data[i]) == 'x' || isxdigit(data[i])); i++); + for (i = 0; i < 32 && i < edid_data.size() && + (isspace(data[i]) || strchr(ignore_chars, data[i]) || + tolower(data[i]) == 'x' || isxdigit(data[i])); i++); if (i == 32) return extract_edid_hex(data);