diff options
author | bapt <bapt@FreeBSD.org> | 2016-07-03 15:00:12 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2016-07-03 15:00:12 +0000 |
commit | 3a5de1349738b529b1a852fec388c0d6722ce11e (patch) | |
tree | dd06586d244cd1debbf62deb73577c755dd4c85c /lib/libc | |
parent | c31bb3499e1215ae394355f759575e2bb6b3b562 (diff) | |
download | FreeBSD-src-3a5de1349738b529b1a852fec388c0d6722ce11e.zip FreeBSD-src-3a5de1349738b529b1a852fec388c0d6722ce11e.tar.gz |
Fix a bad test resulting in a segfault with ISO-8859-5 locales
Reported by: Lauri Tirkkonen from Illumos
Approved by: re@ (gjb)
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/locale/collate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/locale/collate.c b/lib/libc/locale/collate.c index 0236630..53b6c77 100644 --- a/lib/libc/locale/collate.c +++ b/lib/libc/locale/collate.c @@ -310,7 +310,7 @@ _collate_lookup(struct xlocale_collate *table, const wchar_t *t, int *len, if ((sptr = *state) != NULL) { *pri = *sptr; sptr++; - if ((sptr == *state) || (sptr == NULL)) + if ((sptr == *state) || (*sptr == 0)) *state = NULL; else *state = sptr; |