kernel: check return code of nla_parse in pcomp_lzma on 2.6.31
authorGabor Juhos <juhosg@openwrt.org>
Wed, 23 Sep 2009 09:30:31 +0000 (09:30 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Wed, 23 Sep 2009 09:30:31 +0000 (09:30 +0000)
SVN-Revision: 17683

target/linux/generic-2.6/patches-2.6.31/052-pcomp_lzma_support.patch

index ff2302c98770da885718584c5cec0ce90262489e..48eb07de7e2f5cf5b564f52fd7f871043507637d 100644 (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>
 +              return -EINVAL;
 +
 +      ret = nla_parse(tb, UNLZMA_DECOMP_MAX, p, len, NULL);
++      if (ret)
++              return ret;
++
 +      if (!tb[UNLZMA_DECOMP_OUT_BUFFERS])
 +              return -EINVAL;
 +