aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2020-11-22 17:43:27 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-11-22 17:43:27 +0100
commit4f91832229968bb88b14aa0d85f7981643305ba4 (patch)
treebc8dff8cba23a68029b6aaeaf03cad47cef8d3ef
parent0786bfb2c6429777f16acc3320a9f7a6e2a8adae (diff)
edid-decode: fix hdmi_vic_to_vic()
The edid_hdmi_mode_map array access is off by one, fix this. Reported by val.zapod.vz@gmail.com. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--parse-cta-block.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse-cta-block.cpp b/parse-cta-block.cpp
index 61a5e2c..b9e59d5 100644
--- a/parse-cta-block.cpp
+++ b/parse-cta-block.cpp
@@ -193,7 +193,7 @@ static const unsigned char edid_hdmi_mode_map[] = { 95, 94, 93, 98 };
unsigned char hdmi_vic_to_vic(unsigned char hdmi_vic)
{
if (hdmi_vic > 0 && hdmi_vic <= ARRAY_SIZE(edid_hdmi_mode_map))
- return edid_hdmi_mode_map[hdmi_vic];
+ return edid_hdmi_mode_map[hdmi_vic - 1];
return 0;
}

Privacy Policy