diff --git a/src/fwrite_le.c b/src/fwrite_le.c index 4a3b4cc..7e0eb43 100644 --- a/src/fwrite_le.c +++ b/src/fwrite_le.c @@ -65,9 +65,9 @@ size_t fwrite_le( // case: big-endian size_t bytes_count = size * count; #if FWRITE_LE_NO_MODIFICATION - uint8_t* bytes = calloc(bytes_count, sizeof(uint8_t)); + uint8_t* bytes = malloc(bytes_count * sizeof(uint8_t)); if (bytes == NULL) { - perror("calloc"); + perror("malloc"); exit(EXIT_FAILURE); } memcpy(bytes, ptr, bytes_count);