1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-25 03:13:20 +02:00

kernel: check return code of nla_parse in pcomp_lzma on 2.6.31

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17683 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
juhosg 2009-09-23 09:30:31 +00:00
parent 6a36104faa
commit 928f811d46

View File

@ -1,6 +1,6 @@
--- /dev/null
+++ b/crypto/unlzma.c
@@ -0,0 +1,772 @@
@@ -0,0 +1,775 @@
+/*
+ * LZMA uncompresion module for pcomp
+ * Copyright (C) 2009 Felix Fietkau <nbd@openwrt.org>
@ -636,6 +636,9 @@
+ return -EINVAL;
+
+ ret = nla_parse(tb, UNLZMA_DECOMP_MAX, p, len, NULL);
+ if (ret)
+ return ret;
+
+ if (!tb[UNLZMA_DECOMP_OUT_BUFFERS])
+ return -EINVAL;
+