vcpkg/ports/libzip/avoid_computation_on_void_pointer.patch
Lars Ivar Hatledal 7609de8497 Update libzip to 1.5.2 (#5656)
* Update libzip to 1.5.2

* Remove reference to patch in portfile

* Add patch to fix compilation on windows

* Prefer ninja and fix indentation
2019-03-13 10:06:49 -07:00

14 lines
649 B
Diff

diff --git a/lib/zip_source_winzip_aes_encode.c b/lib/zip_source_winzip_aes_encode.c
--- a/lib/zip_source_winzip_aes_encode.c
+++ b/lib/zip_source_winzip_aes_encode.c
@@ -163,7 +163,7 @@ winzip_aes_encrypt(zip_source_t *src, void *ud, void *data, zip_uint64_t length,
/* TODO: return partial read? */
return -1;
}
- buffer_n += _zip_buffer_read(ctx->buffer, data + ret, length - (zip_uint64_t)ret);
+ buffer_n += _zip_buffer_read(ctx->buffer, (zip_uint8_t *)data + ret, length - (zip_uint64_t)ret);
}
return (zip_int64_t)(buffer_n + (zip_uint64_t)ret);