diff options
| author | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2025-12-19 17:29:56 +1100 |
|---|---|---|
| committer | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2025-12-19 17:29:56 +1100 |
| commit | 53af2b5bcab39fb481379121c8c55da8b01d0db3 (patch) | |
| tree | cb4bc00523210fd1a346aa5db8e9ccbb1daed4fb /src | |
| parent | 44836c490dfa27e2f13a613d2b5ae800d17afbf6 (diff) | |
fix(png): cast malloc return type for data_buffer in ff_next_chunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/format/image/png.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/format/image/png.c b/src/format/image/png.c index b454654..1da687f 100644 --- a/src/format/image/png.c +++ b/src/format/image/png.c @@ -59,7 +59,7 @@ ff_result ff_next_chunk(FILE *file, ff_png_chunk **out_chunk) { uint32_t chunk_type = get_big_endian(type_buffer); // 3. Read data (data_chunk_length bytes) - uint32_t *data_buffer = (uint32_t)malloc(data_chunk_length * sizeof(ff_byte)); + uint32_t *data_buffer = (uint32_t *)malloc(data_chunk_length * sizeof(ff_byte)); if (fread(data_buffer, sizeof(ff_byte), data_chunk_length, file) != data_chunk_length) { free(data_buffer); |
