]> git.ipfire.org Git - thirdparty/coreutils.git/commit
maint: avoid undefined behavior in qsort call
authorPádraig Brady <P@draigBrady.com>
Wed, 24 Jun 2015 18:14:47 +0000 (19:14 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 24 Jun 2015 18:15:31 +0000 (19:15 +0100)
commit77547ba7b26aa65fc0f6dfcc0cb8235686699611
tree8f06d549184fb90506b94b2a13524c421e9cabab
parent4d2d6c5b7c455392617609ae21b6b21879e12975
maint: avoid undefined behavior in qsort call

GCC 5.1.1 -fsanitize=undefined with glibc 2.21 is returning:
"runtime error: null pointer passed as argument 1,
 which is declared to never be null"
* src/ptx.c (sort_found_occurs): Avoid the call with no entries.
src/ptx.c