diff options
author | das <das@FreeBSD.org> | 2008-01-13 02:11:10 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2008-01-13 02:11:10 +0000 |
commit | 1daf1db8d416545ee59097baf8375ff49de4bfce (patch) | |
tree | 8ab753cca46bb4886744da1c76766f12410a0f88 /lib/libc/stdlib/heapsort.c | |
parent | a440b7cce737193f955f2a95a2915af773f05d03 (diff) | |
download | FreeBSD-src-1daf1db8d416545ee59097baf8375ff49de4bfce.zip FreeBSD-src-1daf1db8d416545ee59097baf8375ff49de4bfce.tar.gz |
Use size_t to avoid overflow when sorting arrays larger than 2 GB.
PR: 111085
MFC after: 2 weeks
Diffstat (limited to 'lib/libc/stdlib/heapsort.c')
-rw-r--r-- | lib/libc/stdlib/heapsort.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdlib/heapsort.c b/lib/libc/stdlib/heapsort.c index 135c48b..f656876 100644 --- a/lib/libc/stdlib/heapsort.c +++ b/lib/libc/stdlib/heapsort.c @@ -141,7 +141,7 @@ heapsort(vbase, nmemb, size, compar) size_t nmemb, size; int (*compar)(const void *, const void *); { - int cnt, i, j, l; + size_t cnt, i, j, l; char tmp, *tmp1, *tmp2; char *base, *k, *p, *t; |