提交 22caa041 编写于 作者: J Jim Meyering 提交者: Linus Torvalds

lib/inflate.c: handle failed malloc()

lib/inflate.c (inflate_dynamic): Don't deref NULL upon failed malloc.
Signed-off-by: NJim Meyering <meyering@redhat.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 cd6fda36
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册