diff options
| author | David Laight <david.laight.linux@gmail.com> | 2026-06-08 13:42:42 +0100 |
|---|---|---|
| committer | Helge Deller <deller@gmx.de> | 2026-06-09 16:00:17 +0200 |
| commit | d8421e09382cfe0bd2a044c8b0a822f64855dd4e (patch) | |
| tree | a9a691e9a881935fa8f4bdf1ad3b932b4b9c3065 /scripts/Makefile.thinlto | |
| parent | f5c147fda9c6c553bfc2b86e0734b4594f2a9a7d (diff) | |
fbdev: sm501fb: Fix buffer errors in OF binding code
The code that gets the frame buffer mode from OF has 'use after free',
'buffer overrun' and memory leaks.
info->edid_data isn't free if the probe functions fail or if
pd->def_mode is set.
If both the CRT and PANEL are enabled info->edid_data is used after
being freed and is freed twice.
The string returned by of_get_property(np, "mode", &len) is just
written over either the static "640x480-16@60" or the module parameter
string without any regard for the length (which is most likely longer).
Use kstrump() for the OF mode and free everything before freeing 'info.
Fixes: 4295f9bf74a88 ("video, sm501: add OF binding to support SM501")
Signed-off-by: David Laight <david.laight.linux@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
