projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a596c4
)
edid: Use sizeof() in cea_is_hdmi_vsdb_present()
author
Simon Glass
<sjg@chromium.org>
Wed, 7 Jun 2017 16:28:39 +0000
(10:28 -0600)
committer
Tom Rini
<trini@konsulko.com>
Mon, 12 Jun 2017 12:38:06 +0000
(08:38 -0400)
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)
common/edid.c
patch
|
blob
|
history
diff --git
a/common/edid.c
b/common/edid.c
index 854d40c8f8b46817efdb251e026a3eaf1462749e..3d0809ad11c2d2e1ca615a9cac681233cb1e6dd5 100644
(file)
--- 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;