svn commit: r302916 - head/lib/libc/locale
Baptiste Daroussin
bapt at FreeBSD.org
Fri Jul 15 23:03:21 UTC 2016
Author: bapt
Date: Fri Jul 15 23:03:20 2016
New Revision: 302916
URL: https://svnweb.freebsd.org/changeset/base/302916
Log:
Revert 302324 and properly fix the crash with ISO-8859-5 locales
PR: 211135
Reported by: jkim
Tested by: jkim
MFC after: 2 days
Modified:
head/lib/libc/locale/collate.c
Modified: head/lib/libc/locale/collate.c
==============================================================================
--- head/lib/libc/locale/collate.c Fri Jul 15 21:30:19 2016 (r302915)
+++ head/lib/libc/locale/collate.c Fri Jul 15 23:03:20 2016 (r302916)
@@ -310,7 +310,7 @@ _collate_lookup(struct xlocale_collate *
if ((sptr = *state) != NULL) {
*pri = *sptr;
sptr++;
- if ((sptr == *state) || (*sptr == 0))
+ if ((sptr == *state) || (sptr == NULL))
*state = NULL;
else
*state = sptr;
@@ -451,6 +451,7 @@ _collate_wxfrm(struct xlocale_collate *t
errno = EINVAL;
goto fail;
}
+ state = NULL;
pri = COLLATE_MAX_PRIORITY;
}
if (room) {
@@ -469,6 +470,7 @@ _collate_wxfrm(struct xlocale_collate *t
errno = EINVAL;
goto fail;
}
+ state = NULL;
continue;
}
if (room) {
@@ -597,6 +599,7 @@ _collate_sxfrm(struct xlocale_collate *t
errno = EINVAL;
goto fail;
}
+ state = NULL;
pri = COLLATE_MAX_PRIORITY;
}
@@ -622,6 +625,7 @@ _collate_sxfrm(struct xlocale_collate *t
errno = EINVAL;
goto fail;
}
+ state = NULL;
continue;
}
More information about the svn-src-head
mailing list