X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fcompress_serial.c;h=20e069c075358f804a12bed2bf8e21eaf5f615e2;hp=0ae354834286b8e84db6987e7391df262f2df89e;hb=f675c45459508d058aeda4869e2928be4b7ffd99;hpb=883833a4b3dabec325edf1ca938000f91d587c00 diff --git a/src/compress_serial.c b/src/compress_serial.c index 0ae35483..20e069c0 100644 --- a/src/compress_serial.c +++ b/src/compress_serial.c @@ -38,8 +38,8 @@ struct serial_chunk_compressor { struct wimlib_compressor *compressor; u8 *udata; u8 *cdata; - unsigned ulen; - unsigned clen; + u32 ulen; + u32 clen; }; static void @@ -75,8 +75,8 @@ serial_chunk_compressor_submit_chunk(struct chunk_compressor *_ctx, static bool serial_chunk_compressor_get_chunk(struct chunk_compressor *_ctx, - const void **cdata_ret, unsigned *csize_ret, - unsigned *usize_ret) + const void **cdata_ret, u32 *csize_ret, + u32 *usize_ret) { struct serial_chunk_compressor *ctx = (struct serial_chunk_compressor*)_ctx; @@ -107,6 +107,8 @@ new_serial_chunk_compressor(int out_ctype, u32 out_chunk_size, struct serial_chunk_compressor *ctx; int ret; + wimlib_assert(out_chunk_size > 0); + ctx = CALLOC(1, sizeof(*ctx)); if (ctx == NULL) return WIMLIB_ERR_NOMEM;