Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit fd0977d0 authored by Jesper Juhl's avatar Jesper Juhl Committed by Takashi Iwai
Browse files

ALSA: asihpi - Unsafe memory management when allocating control cache



I noticed that sound/pci/asihpi/hpicmn.c::hpi_alloc_control_cache() does
not check the return value from kmalloc(), which may fail.
If kmalloc() fails we'll dereference a null pointer and things will go bad
fast.
There are two memory allocations in that function and there's also the
problem that the first may succeed and the second may fail and nothing is
done about that either which will also go wrong down the line.

Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
Acked-by: default avatarEliot Blennerhassett <linux@audioscience.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent f7467452
Loading
Loading
Loading
Loading
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