projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd6fda3
)
lib/inflate.c: handle failed malloc()
author
Jim Meyering
<jim@meyering.net>
Tue, 29 Apr 2008 07:59:09 +0000
(
00:59
-0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Tue, 29 Apr 2008 15:06:02 +0000
(08:06 -0700)
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>
lib/inflate.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/inflate.c
b/lib/inflate.c
index 845f91d3ac1226ad6bee1e87e1fc74169ccd36cf..9762294be06257b6d6e6873dbd6b0503f21029c1 100644
(file)
--- a/
lib/inflate.c
+++ b/
lib/inflate.c
@@
-811,6
+811,9
@@
DEBG("<dyn");
ll = malloc(sizeof(*ll) * (286+30)); /* literal/length and distance code lengths */
#endif
+ if (ll == NULL)
+ return 1;
+
/* make local bit buffer */
b = bb;
k = bk;