From a01254912693cd1e9f7f4dab8b475c1b8287a9fb Mon Sep 17 00:00:00 2001 From: TazyFoundSoup Date: Tue, 14 Apr 2026 10:12:36 +1000 Subject: fix(png): Fix tinf_uncompress out_size bug --- src/format/image/png.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/format/image/png.c b/src/format/image/png.c index af04243..fa803bc 100644 --- a/src/format/image/png.c +++ b/src/format/image/png.c @@ -192,7 +192,8 @@ ff_result ff_png_data_handler(ff_ctx* ctx, uint8_t *buf, size_t len, ff_png_ctx return FF_RESULT_ERROR_MEMORY_ALLOCATION; } - if (tinf_uncompress(uncompressed_data, (unsigned int *)uncompressed_size, buf, len) != TINF_OK) { + unsigned int out_size = (unsigned int)uncompressed_size; + if (tinf_uncompress(uncompressed_data, &out_size, buf, len) != TINF_OK) { ff_dprintf(ctx, "png: failed to uncompress IDAT data\n"); ctx->allocator.ff_free(uncompressed_data); -- cgit v1.2.3