mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
lib/inflate.c: handle failed malloc()
lib/inflate.c (inflate_dynamic): Don't deref NULL upon failed malloc. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
cd6fda3608
commit
22caa0417d
@@ -811,6 +811,9 @@ DEBG("<dyn");
|
|||||||
ll = malloc(sizeof(*ll) * (286+30)); /* literal/length and distance code lengths */
|
ll = malloc(sizeof(*ll) * (286+30)); /* literal/length and distance code lengths */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (ll == NULL)
|
||||||
|
return 1;
|
||||||
|
|
||||||
/* make local bit buffer */
|
/* make local bit buffer */
|
||||||
b = bb;
|
b = bb;
|
||||||
k = bk;
|
k = bk;
|
||||||
|
Reference in New Issue
Block a user