Commit d5c6f647 authored by Pin-Yen Lin's avatar Pin-Yen Lin Committed by Robert Foss

drm/bridge: anx7625: Fix overflow issue on reading EDID

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: 8bdfc5da ("drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP")
Signed-off-by: default avatarPin-Yen Lin <treapking@chromium.org>
Reviewed-by: default avatarJernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: default avatarRobert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220210103827.402436-1-treapking@chromium.org
parent 7db47b83
...@@ -1109,7 +1109,8 @@ static int segments_edid_read(struct anx7625_data *ctx, ...@@ -1109,7 +1109,8 @@ static int segments_edid_read(struct anx7625_data *ctx,
static int sp_tx_edid_read(struct anx7625_data *ctx, static int sp_tx_edid_read(struct anx7625_data *ctx,
u8 *pedid_blocks_buf) u8 *pedid_blocks_buf)
{ {
u8 offset, edid_pos; u8 offset;
int edid_pos;
int count, blocks_num; int count, blocks_num;
u8 pblock_buf[MAX_DPCD_BUFFER_SIZE]; u8 pblock_buf[MAX_DPCD_BUFFER_SIZE];
u8 i, j; u8 i, j;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment