summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-11-08 07:15:29 -0500
committerTom Rini <trini@konsulko.com>2018-11-08 07:15:29 -0500
commit711720a0b3943ac9e7e3b122e8903bc6a3b039a4 (patch)
tree8ad4b0757220174ac8465baf16b4b08c6507ed6f
parentc5bbfaf05dc8592b479a44df6abaadbab54fec2b (diff)
parente4aa10ba5770fc391bf8a4b00c131353901704e7 (diff)
downloadu-boot-711720a0b3943ac9e7e3b122e8903bc6a3b039a4.tar.gz
u-boot-711720a0b3943ac9e7e3b122e8903bc6a3b039a4.tar.bz2
u-boot-711720a0b3943ac9e7e3b122e8903bc6a3b039a4.zip
Merge branch 'master' of git://git.denx.de/u-boot-ubi
-rw-r--r--fs/ubifs/ubifs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index 47fa41ad1d..d5101d3c45 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -125,6 +125,7 @@ crypto_comp_decompress(const struct ubifs_info *c, struct crypto_comp *tfm,
{
struct ubifs_compressor *compr = ubifs_compressors[tfm->compressor];
int err;
+ size_t tmp_len = *dlen;
if (compr->compr_type == UBIFS_COMPR_NONE) {
memcpy(dst, src, slen);
@@ -132,11 +133,12 @@ crypto_comp_decompress(const struct ubifs_info *c, struct crypto_comp *tfm,
return 0;
}
- err = compr->decompress(src, slen, dst, (size_t *)dlen);
+ err = compr->decompress(src, slen, dst, &tmp_len);
if (err)
ubifs_err(c, "cannot decompress %d bytes, compressor %s, "
"error %d", slen, compr->name, err);
+ *dlen = tmp_len;
return err;
return 0;