Skip to content

Commit

Permalink
fix: calloc() swapped arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
winex authored and cxong committed Dec 31, 2024
1 parent 53bf676 commit 76ca927
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cdogs/cwolfmap/zip/zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 76ca927

Please sign in to comment.