Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Sort an empty list without handing qsort a null
Every list sorted here is null until its first entry, and C leaves a null base undefined even with nothing to sort. glibc declares it nonnull, and a UBSan build aborted the stats page of a repository with no commits in the window.
-rw-r--r--source/cgit.c2
-rw-r--r--source/shared.h12
-rw-r--r--source/ui-refs.c12
-rw-r--r--source/ui-repolist.c2
-rw-r--r--source/ui-stats.c2
5 files changed, 21 insertions, 9 deletions