diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2019-12-01 14:11:20 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2019-12-01 14:11:20 +0100 |
commit | f7ad8cb735f1a77bf7e6c0b296a2c362ab3a8a86 (patch) | |
tree | 0d53fe92f438d0749a9e4d134ec8aa89ab6a1352 /parse-ls-ext-block.cpp | |
parent | 6abd85db0a1a2d67f52a44727df4cdcd1f8b8578 (diff) |
edid-decode: check for non-0 filler bytes in LS Ext
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'parse-ls-ext-block.cpp')
-rw-r--r-- | parse-ls-ext-block.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/parse-ls-ext-block.cpp b/parse-ls-ext-block.cpp index 117abba..1776715 100644 --- a/parse-ls-ext-block.cpp +++ b/parse-ls-ext-block.cpp @@ -61,4 +61,8 @@ void edid_state::parse_ls_ext_block(const unsigned char *x) parse_string_table(x + 1); x += x[0]; } + if (!memchk(x, orig + 127 - x)) { + data_block.clear(); + fail("Non-zero values in unused space\n"); + } } |