Skip to content

Commit

Permalink
Fix incorrect order of argument to calloc
Browse files Browse the repository at this point in the history
  • Loading branch information
AHSauge committed May 11, 2024
1 parent 6f2116d commit eef90e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit eef90e5

Please sign in to comment.