mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ubifs: Fix pointer type mismatch in gzip decompressor
@ 2022-09-13 10:55 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2022-09-13 10:55 UTC (permalink / raw)
  To: Barebox List

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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-13 10:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-13 10:55 [PATCH] ubifs: Fix pointer type mismatch in gzip decompressor Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox