aboutsummaryrefslogtreecommitdiff
path: root/posix/regex_internal.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-01-14 01:45:37 +0000
committerUlrich Drepper <drepper@redhat.com>2004-01-14 01:45:37 +0000
commit294b6bcc13c28fe4b4d605a9f8e3cab58e6853ca (patch)
tree0b9a617357049d60273de6ba5210ec4363c2b085 /posix/regex_internal.h
parent81144a9c4e2ef74f2e935192db562684793a4da9 (diff)
downloadglibc-294b6bcc13c28fe4b4d605a9f8e3cab58e6853ca.zip
glibc-294b6bcc13c28fe4b4d605a9f8e3cab58e6853ca.tar.gz
glibc-294b6bcc13c28fe4b4d605a9f8e3cab58e6853ca.tar.bz2
Update.
2004-01-14 Jakub Jelinek <jakub@redhat.com> * posix/regcomp.c (peek_token_bracket): Check remaining string length before re_string_peek_byte (x, 1). (parse_bracket_symbol): Likewise. * posix/regex_internal.h (re_string_is_single_byte_char): Return true at last byte in the string. * posix/bug-regex22.c (main): Add new test.
Diffstat (limited to 'posix/regex_internal.h')
-rw-r--r--posix/regex_internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/posix/regex_internal.h b/posix/regex_internal.h
index 084028f..6cbc48e 100644
--- a/posix/regex_internal.h
+++ b/posix/regex_internal.h
@@ -408,7 +408,7 @@ static unsigned char re_string_fetch_byte_case (re_string_t *pstr)
#define re_string_first_byte(pstr, idx) \
((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF)
#define re_string_is_single_byte_char(pstr, idx) \
- ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) \
+ ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) + 1 \
|| (pstr)->wcs[(idx) + 1] != WEOF))
#define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx)
#define re_string_cur_idx(pstr) ((pstr)->cur_idx)