Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The prototype is "void *calloc(size_t nelem, size_t elsize);" These two instances had them reversed, almost certainly leading to buffer overflow issues. This was detected by -Werror=calloc-transposed-args on gcc. Signed-off-by: Stephen Gallagher <[email protected]>
- Loading branch information
Excuse my ignorance, but I do wonder how could this possible lead to buffer overflows?
The size of the buffer is
nelem * elsize
, and multiplication is commutative, sure it's nicer this way, but this change is purely cosmetic.