Commit e1ca5f39 authored by Qasim Ijaz's avatar Qasim Ijaz Committed by Jiri Kosina
Browse files

HID: wacom: handle kzalloc() allocation failure in wacom_wac_queue_flush()



During wacom_wac_queue_flush() the code calls
kzalloc() to allocate a zero initialised buffer
which it uses as a storage buffer to get data
from the fifo via kfifo_out(). However it does not
check kzalloc() for allocation failure which returns
NULL and could potentially lead to a NULL deref.

Fix this by checking for kzalloc() failure and skipping
the current entry if allocation failure occurs.

Fixes: 5e013ad2 ("HID: wacom: Remove static WACOM_PKGLEN_MAX limit")
Signed-off-by: default avatarQasim Ijaz <qasdev00@gmail.com>
Reviewed-by: default avatarJason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
parent 09d54630
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment