Skip to content
Snippets Groups Projects
Commit 8a21ea4b authored by Mathis Rosenhauer's avatar Mathis Rosenhauer
Browse files

Fix padded buffer size.

Was needlessly large before.
parent 4de94dc2
No related branches found
No related tags found
No related merge requests found
......@@ -151,7 +151,7 @@ int SZ_BufftoBuffCompress(void *dest, size_t *destLen,
pixel_size = bits_to_bytes(strm.bits_per_sample);
if (pad_scanline) {
scanlines = (sourceLen + param->pixels_per_scanline - 1)
scanlines = (sourceLen / pixel_size + param->pixels_per_scanline - 1)
/ param->pixels_per_scanline;
padbuf_size = strm.rsi * strm.block_size * pixel_size * scanlines;
padbuf = malloc(padbuf_size);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment