mirror of
https://github.com/opnsense/src.git
synced 2026-04-15 14:29:58 -04:00
Revert 302324 and properly fix the crash with ISO-8859-5 locales
PR: 211135 Reported by: jkim Tested by: jkim MFC after: 2 days
This commit is contained in:
parent
eeb341a9f3
commit
dee0bbbdca
1 changed files with 5 additions and 1 deletions
|
|
@ -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 == 0))
|
||||
if ((sptr == *state) || (sptr == NULL))
|
||||
*state = NULL;
|
||||
else
|
||||
*state = sptr;
|
||||
|
|
@ -451,6 +451,7 @@ _collate_wxfrm(struct xlocale_collate *table, const wchar_t *src, wchar_t *xf,
|
|||
errno = EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
state = NULL;
|
||||
pri = COLLATE_MAX_PRIORITY;
|
||||
}
|
||||
if (room) {
|
||||
|
|
@ -469,6 +470,7 @@ _collate_wxfrm(struct xlocale_collate *table, const wchar_t *src, wchar_t *xf,
|
|||
errno = EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
state = NULL;
|
||||
continue;
|
||||
}
|
||||
if (room) {
|
||||
|
|
@ -597,6 +599,7 @@ _collate_sxfrm(struct xlocale_collate *table, const wchar_t *src, char *xf,
|
|||
errno = EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
state = NULL;
|
||||
pri = COLLATE_MAX_PRIORITY;
|
||||
}
|
||||
|
||||
|
|
@ -622,6 +625,7 @@ _collate_sxfrm(struct xlocale_collate *table, const wchar_t *src, char *xf,
|
|||
errno = EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
state = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue