svn commit: r302324 - head/lib/libc/locale
Baptiste Daroussin
bapt at FreeBSD.org
Sun Jul 3 15:00:13 UTC 2016
Author: bapt
Date: Sun Jul 3 15:00:12 2016
New Revision: 302324
URL: https://svnweb.freebsd.org/changeset/base/302324
Log:
Fix a bad test resulting in a segfault with ISO-8859-5 locales
Reported by: Lauri Tirkkonen from Illumos
Approved by: re@ (gjb)
Modified:
head/lib/libc/locale/collate.c
Modified: head/lib/libc/locale/collate.c
==============================================================================
--- head/lib/libc/locale/collate.c Sun Jul 3 11:45:54 2016 (r302323)
+++ head/lib/libc/locale/collate.c Sun Jul 3 15:00:12 2016 (r302324)
@@ -310,7 +310,7 @@ _collate_lookup(struct xlocale_collate *
if ((sptr = *state) != NULL) {
*pri = *sptr;
sptr++;
- if ((sptr == *state) || (sptr == NULL))
+ if ((sptr == *state) || (*sptr == 0))
*state = NULL;
else
*state = sptr;
More information about the svn-src-all
mailing list