public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Martin Peres <martin.peres@linux.intel.com>
To: Simon Ser <simon.ser@intel.com>, igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] lib/igt_edid: assert data blocks fit in CEA extension
Date: Fri, 19 Jul 2019 16:42:16 +0300	[thread overview]
Message-ID: <eff33696-49a6-9a1a-63c8-b55930f799f7@linux.intel.com> (raw)
In-Reply-To: <20190719120145.2154-1-simon.ser@intel.com>

On 19/07/2019 15:01, Simon Ser wrote:
> 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>

Reviewed-by: Martin Peres <martin.peres@linux.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

  parent reply	other threads:[~2019-07-19 13:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Martin Peres [this message]
2019-07-19 14:42 ` [igt-dev] ✓ Fi.CI.IGT: " 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=eff33696-49a6-9a1a-63c8-b55930f799f7@linux.intel.com \
    --to=martin.peres@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=simon.ser@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox