summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-06-07 16:28:39 (GMT)
committerTom Rini <trini@konsulko.com>2017-06-12 12:38:06 (GMT)
commit66a1b30d14566676293ba4010a0d592adc61ce95 (patch)
treed851948434d7121c86f5d160bb0ad390e73e8086 /common
parent1a596c44c0967b3191ee278f988d14d6082249e1 (diff)
downloadu-boot-66a1b30d14566676293ba4010a0d592adc61ce95.tar.xz
edid: Use sizeof() in cea_is_hdmi_vsdb_present()
We should not use an open-coded value here. Use sizeof() instead. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 163252) Fixes: 43c6bdd0 (edid: Add HDMI flag to timing info)
Diffstat (limited to 'common')
-rw-r--r--common/edid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/edid.c b/common/edid.c
index 854d40c..3d0809a 100644
--- a/common/edid.c
+++ b/common/edid.c
@@ -148,8 +148,8 @@ static bool cea_is_hdmi_vsdb_present(struct edid_cea861_info *info)
/* check for end of data block */
end = info->dtd_offset;
if (end == 0)
- end = 127;
- if (end < 4 || end > 127)
+ end = sizeof(info->data);
+ if (end < 4 || end > sizeof(info->data))
return false;
end -= 4;