From eef90e51a6f6f0c4d34858a56b343db0ba8c6979 Mon Sep 17 00:00:00 2001 From: Alf Henrik Sauge Date: Sat, 11 May 2024 11:48:02 +0200 Subject: [PATCH] Fix incorrect order of argument to calloc --- src/zip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zip.c b/src/zip.c index b14f9e3b..a7e5ef81 100644 --- a/src/zip.c +++ b/src/zip.c @@ -1874,7 +1874,7 @@ ssize_t zip_stream_copy(struct zip_t *zip, void **buf, size_t *bufsize) { *bufsize = n; } - *buf = calloc(sizeof(unsigned char), n); + *buf = calloc(n, sizeof(unsigned char)); memcpy(*buf, zip->archive.m_pState->m_pMem, n); return (ssize_t)n;