mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
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)
This commit is contained in:
parent
1a596c44c0
commit
66a1b30d14
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue