From 72a2079aa02bcb86051dc527cc1c21fc77bc3695 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Fri, 13 Jun 2014 23:36:09 -0500 Subject: [PATCH] chunk_compressor: Use u32 for chunk uncompressed size All chunk sizes must fit in a 32-bit integer because they cannot exceed 'out_chunk_size'. --- include/wimlib/chunk_compressor.h | 2 +- src/compress_parallel.c | 2 +- src/compress_serial.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/wimlib/chunk_compressor.h b/include/wimlib/chunk_compressor.h index b902038a..96954637 100644 --- a/include/wimlib/chunk_compressor.h +++ b/include/wimlib/chunk_compressor.h @@ -32,7 +32,7 @@ struct chunk_compressor { * %false if the chunk compressor does not have space for the chunk at * the present time. In the latter case, get_chunk() must be called to * retrieve a compressed chunk before trying again. */ - bool (*submit_chunk)(struct chunk_compressor *, const void *, size_t); + bool (*submit_chunk)(struct chunk_compressor *, const void *, u32); /* Get the next chunk of compressed data. * diff --git a/src/compress_parallel.c b/src/compress_parallel.c index f339298a..c33c0965 100644 --- a/src/compress_parallel.c +++ b/src/compress_parallel.c @@ -332,7 +332,7 @@ submit_compression_msg(struct parallel_chunk_compressor *ctx) static bool parallel_chunk_compressor_submit_chunk(struct chunk_compressor *_ctx, - const void *chunk, size_t size) + const void *chunk, u32 size) { struct parallel_chunk_compressor *ctx = (struct parallel_chunk_compressor *)_ctx; struct message *msg; diff --git a/src/compress_serial.c b/src/compress_serial.c index 20e069c0..7885a97e 100644 --- a/src/compress_serial.c +++ b/src/compress_serial.c @@ -58,7 +58,7 @@ serial_chunk_compressor_destroy(struct chunk_compressor *_ctx) static bool serial_chunk_compressor_submit_chunk(struct chunk_compressor *_ctx, - const void *chunk, size_t size) + const void *chunk, u32 size) { struct serial_chunk_compressor *ctx = (struct serial_chunk_compressor*)_ctx; -- 2.43.0