summaryrefslogtreecommitdiff
path: root/compat/qsort.c
diff options
context:
space:
mode:
Diffstat (limited to 'compat/qsort.c')
-rw-r--r--compat/qsort.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/qsort.c b/compat/qsort.c
index 9574d537bd..7d071afb70 100644
--- a/compat/qsort.c
+++ b/compat/qsort.c
@@ -47,7 +47,7 @@ static void msort_with_tmp(void *b, size_t n, size_t s,
void git_qsort(void *b, size_t n, size_t s,
int (*cmp)(const void *, const void *))
{
- const size_t size = n * s;
+ const size_t size = st_mult(n, s);
char buf[1024];
if (size < sizeof(buf)) {