svn commit: r303112 - stable/11/lib/libc/locale
Baptiste Daroussin
bapt at FreeBSD.org
Wed Jul 20 20:12:59 UTC 2016
Author: bapt
Date: Wed Jul 20 20:12:58 2016
New Revision: 303112
URL: https://svnweb.freebsd.org/changeset/base/303112
Log:
MFC: r302916
Revert 302324 and properly fix the crash with ISO-8859-5 locales
PR: 211135
Reported by: jkim
Tested by: jkim
Approved by: re (gjb)
Modified:
stable/11/lib/libc/locale/collate.c
Modified: stable/11/lib/libc/locale/collate.c
==============================================================================
--- stable/11/lib/libc/locale/collate.c Wed Jul 20 20:10:37 2016 (r303111)
+++ stable/11/lib/libc/locale/collate.c Wed Jul 20 20:12:58 2016 (r303112)
@@ -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-stable-11
mailing list