diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-02-11 22:49:57 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-02-11 22:49:57 +0000 |
commit | 6c2a04a7e8a1e4c8fb69442eab126e9f275b785b (patch) | |
tree | b552bab041944b822f1e6421500b6acaca9be698 /posix/regexec.c | |
parent | 22d9c1ee55f5955e996d5b3017844d2fdfcea330 (diff) | |
download | glibc-6c2a04a7e8a1e4c8fb69442eab126e9f275b785b.tar.gz glibc-6c2a04a7e8a1e4c8fb69442eab126e9f275b785b.tar.xz glibc-6c2a04a7e8a1e4c8fb69442eab126e9f275b785b.zip |
Update.
2004-02-11 Jakub Jelinek <jakub@redhat.com> * posix/regexec.c (check_node_accept_bytes): Return 0 if char_len is 0. (find_collation_sequence_value): Don't look beyond end of SYMB_EXTRAMB table. * posix/Makefile (tests): Add bug-regex23. (bug-regex23-ENV): New. * posix/bug-regex23.c: New file. * include/rpc/rpc.h: Declare thread variables with their correct type.
Diffstat (limited to 'posix/regexec.c')
-rw-r--r-- | posix/regexec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/posix/regexec.c b/posix/regexec.c index 32ba80a155..c524ce8fb6 100644 --- a/posix/regexec.c +++ b/posix/regexec.c @@ -3666,7 +3666,7 @@ check_node_accept_bytes (dfa, node_idx, input, str_idx) } elem_len = re_string_elem_size_at (input, str_idx); - if (elem_len <= 1 && char_len <= 1) + if ((elem_len <= 1 && char_len <= 1) || char_len == 0) return 0; if (node->type == COMPLEX_BRACKET) @@ -3847,8 +3847,10 @@ find_collation_sequence_value (mbs, mbs_len) int32_t idx; const unsigned char *extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); + int32_t extrasize = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB + 1) - extra; - for (idx = 0; ;) + for (idx = 0; idx < extrasize;) { int mbs_cnt, found = 0; int32_t elem_mbs_len; @@ -3878,6 +3880,7 @@ find_collation_sequence_value (mbs, mbs_len) /* Skip the collation sequence value. */ idx += sizeof (uint32_t); } + return UINT_MAX; } } # endif /* _LIBC */ |