[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAG3jFytQUetqJ+HrCxSg8njmErCNRSTthCKMy+BRC6LBU0vR6Q@mail.gmail.com>
Date: Mon, 14 Feb 2022 16:23:47 +0100
From: Robert Foss <robert.foss@...aro.org>
To: Pin-Yen Lin <treapking@...omium.org>
Cc: Andrzej Hajda <andrzej.hajda@...el.com>,
Neil Armstrong <narmstrong@...libre.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Jonas Karlman <jonas@...boo.se>,
Jernej Skrabec <jernej.skrabec@...il.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Hsin-Yi Wang <hsinyi@...omium.org>,
Maxime Ripard <maxime@...no.tech>,
Pi-Hsun Shih <pihsun@...omium.org>,
Sam Ravnborg <sam@...nborg.org>,
Tzung-Bi Shih <tzungbi@...gle.com>,
Xin Ji <xji@...logixsemi.com>, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] drm/bridge: anx7625: Fix overflow issue on reading EDID
On Thu, 10 Feb 2022 at 11:38, Pin-Yen Lin <treapking@...omium.org> wrote:
>
> The length of EDID block can be longer than 256 bytes, so we should use
> `int` instead of `u8` for the `edid_pos` variable.
>
> Fixes: 8bdfc5dae4e3 ("drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP")
> Signed-off-by: Pin-Yen Lin <treapking@...omium.org>
> Reviewed-by: Jernej Skrabec <jernej.skrabec@...il.com>
> ---
>
> Changes in v2:
> - add "Fixes" tag
> - collect review tag
>
> drivers/gpu/drm/bridge/analogix/anx7625.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
> index 2346dbcc505f..e596cacce9e3 100644
> --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> @@ -846,7 +846,8 @@ static int segments_edid_read(struct anx7625_data *ctx,
> static int sp_tx_edid_read(struct anx7625_data *ctx,
> u8 *pedid_blocks_buf)
> {
> - u8 offset, edid_pos;
> + u8 offset;
> + int edid_pos;
> int count, blocks_num;
> u8 pblock_buf[MAX_DPCD_BUFFER_SIZE];
> u8 i, j;
> --
> 2.35.0.263.gb82422642f-goog
>
Applied to drm-misc-next.
Powered by blists - more mailing lists