From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] ubifs: Fix pointer type mismatch in gzip decompressor
Date: Tue, 13 Sep 2022 12:55:19 +0200 [thread overview]
Message-ID: <20220913105519.2952569-1-s.hauer@pengutronix.de> (raw)
deflate_decompress() takes a unsigned int * for the out_len argument
whereas ubifs passes a size_t * argument. Adjust the argument type
accordingly.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
fs/ubifs/ubifs.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index 0b4f3de773..71ccd2c0e7 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -46,7 +46,14 @@ static ZSTD_DCtx *ubifs_zstd_cctx;
static int gzip_decompress(const unsigned char *in, size_t in_len,
unsigned char *out, size_t *out_len)
{
- return deflate_decompress(&ubifs_zlib_stream, in, in_len, out, out_len);
+ unsigned int olen;
+ int ret;
+
+ ret = deflate_decompress(&ubifs_zlib_stream, in, in_len, out, &olen);
+
+ *out_len = olen;
+
+ return ret;
}
#endif
--
2.30.2
reply other threads:[~2022-09-13 10:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220913105519.2952569-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox