From: Simon Ser <simon.ser@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] lib/igt_edid: assert data blocks fit in CEA extension
Date: Fri, 19 Jul 2019 15:01:45 +0300 [thread overview]
Message-ID: <20190719120145.2154-1-simon.ser@intel.com> (raw)
This check could probably be more precise, but at least it checks we haven't
written past the EDID block end.
Signed-off-by: Simon Ser <simon.ser@intel.com>
---
lib/igt_edid.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/igt_edid.c b/lib/igt_edid.c
index dcc909bc63bb..1c85486df11b 100644
--- a/lib/igt_edid.c
+++ b/lib/igt_edid.c
@@ -472,6 +472,7 @@ void edid_ext_set_cea(struct edid_ext *ext, size_t data_blocks_size,
assert(num_native_dtds <= 0x0F);
assert((flags & 0x0F) == 0);
+ assert(data_blocks_size <= sizeof(cea->data));
cea->revision = 3;
cea->dtd_start = 4 + data_blocks_size;
cea->misc = flags | num_native_dtds;
--
2.22.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2019-07-19 12:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-19 12:01 Simon Ser [this message]
2019-07-19 12:50 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_edid: assert data blocks fit in CEA extension Patchwork
2019-07-19 13:42 ` [igt-dev] [PATCH i-g-t] " Martin Peres
2019-07-19 14:42 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190719120145.2154-1-simon.ser@intel.com \
--to=simon.ser@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.