summaryrefslogtreecommitdiff
path: root/src/format/image
diff options
context:
space:
mode:
authorTazyFoundSoup <gardendistrict0x0@outlook.com>2026-04-14 10:12:36 +1000
committerTazyFoundSoup <gardendistrict0x0@outlook.com>2026-04-14 10:12:36 +1000
commita01254912693cd1e9f7f4dab8b475c1b8287a9fb (patch)
tree8cd25f2a5be5d56fefa541f9663fe73ee9b2f0dc /src/format/image
parentb30e14c73acee81b9667667e958986a940883c91 (diff)
fix(png): Fix tinf_uncompress out_size bug
Diffstat (limited to 'src/format/image')
-rw-r--r--src/format/image/png.c3
1 files changed, 2 insertions, 1 deletions
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);