mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
video: fbdev: Fix potential NULL pointer dereference
There is a potential NULL pointer dereference in case fb_create_modedb() fails and returns NULL. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Cc: Kees Cook <keescook@chromium.org> Cc: Rob Herring <robh@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
This commit is contained in:
parent
10993504d6
commit
f40298444e
1 changed files with 2 additions and 0 deletions
|
@ -978,6 +978,8 @@ void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
|
|||
get_monspecs(edid, specs);
|
||||
|
||||
specs->modedb = fb_create_modedb(edid, &specs->modedb_len, specs);
|
||||
if (!specs->modedb)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Workaround for buggy EDIDs that sets that the first
|
||||
|
|
Loading…
Reference in a new issue