From 76ca9271d58db411ce942d52c2f66a49314af63e Mon Sep 17 00:00:00 2001 From: Roman Vasiyarov Date: Mon, 30 Dec 2024 20:04:00 +0300 Subject: [PATCH] fix: calloc() swapped arguments --- src/cdogs/cwolfmap/zip/zip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cdogs/cwolfmap/zip/zip.c b/src/cdogs/cwolfmap/zip/zip.c index b50e2f1d7..4e26ad66a 100644 --- a/src/cdogs/cwolfmap/zip/zip.c +++ b/src/cdogs/cwolfmap/zip/zip.c @@ -1673,7 +1673,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;