Skip to content
Snippets Groups Projects
Commit cde4e338 authored by Du Cheng's avatar Du Cheng Committed by Greg Kroah-Hartman
Browse files

drivers: video: fbcon: fix NULL dereference in fbcon_cursor()


commit 01faae51 upstream.

add null-check on function pointer before dereference on ops->cursor

Reported-by: default avatar <syzbot+b67aaae8d3a927f68d20@syzkaller.appspotmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarDu Cheng <ducheng2@gmail.com>
Link: https://lore.kernel.org/r/20210312081421.452405-1-ducheng2@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0ca13611
No related branches found
No related tags found
No related merge requests found
......@@ -1339,6 +1339,9 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
ops->cursor_flash = (mode == CM_ERASE) ? 0 : 1;
if (!ops->cursor)
return;
ops->cursor(vc, info, mode, get_color(vc, info, c, 1),
get_color(vc, info, c, 0));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment