summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDavid Laight <david.laight.linux@gmail.com>2026-06-08 13:42:42 +0100
committerHelge Deller <deller@gmx.de>2026-06-09 16:00:17 +0200
commitd8421e09382cfe0bd2a044c8b0a822f64855dd4e (patch)
treea9a691e9a881935fa8f4bdf1ad3b932b4b9c3065 /scripts
parentf5c147fda9c6c553bfc2b86e0734b4594f2a9a7d (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')
0 files changed, 0 insertions, 0 deletions