public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib/igt_edid: assert data blocks fit in CEA extension
@ 2019-07-19 12:01 Simon Ser
  2019-07-19 12:50 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Simon Ser @ 2019-07-19 12:01 UTC (permalink / raw)
  To: igt-dev

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-19 14:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-19 12:01 [igt-dev] [PATCH i-g-t] lib/igt_edid: assert data blocks fit in CEA extension Simon Ser
2019-07-19 12:50 ` [igt-dev] ✓ Fi.CI.BAT: success for " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox