diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-03-30 05:34:59 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-03-30 05:34:59 +0000 |
commit | 28d2fb9ad9e932d7edab18815c6ff610f1f29857 (patch) | |
tree | 737a0ea071f8ae5f620401f8e3eec5b9184376ee /posix | |
parent | 0a51f0ac0fb51735184c7c149e80be74efbac418 (diff) | |
download | glibc-28d2fb9ad9e932d7edab18815c6ff610f1f29857.tar.gz glibc-28d2fb9ad9e932d7edab18815c6ff610f1f29857.tar.xz glibc-28d2fb9ad9e932d7edab18815c6ff610f1f29857.zip |
Update.
2001-03-29 Ulrich Drepper <drepper@redhat.com> * math/bits/mathcalls.h: Remove infnan declaration. 2001-03-29 H.J. Lu <hjl@gnu.org> * include/endian.h: Define BIG_ENDI, LITTLE_ENDI, HIGH_HALF, and LOW_HALF only if _LIBC is defined and _ISOMAC is not defined. * stdlib/isomac.c (fmt): Define _LIBC and _ISOMAC. . 2001-03-29 Isamu Hasegawa <isamu@yamato.ibm.com> * posix/regex.c: Fix typo and add a sentinel. 2001-03-29 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/shm_open.c: Open new file always with O_NOFOLLOW. Suggested by Christoph Roland.
Diffstat (limited to 'posix')
-rw-r--r-- | posix/regex.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/posix/regex.c b/posix/regex.c index 4c90a4f052..3de24ca206 100644 --- a/posix/regex.c +++ b/posix/regex.c @@ -65,7 +65,7 @@ # define CHAR_CLASS_SIZE ((__alignof__(wctype_t)+sizeof(wctype_t))/sizeof(CHAR_TYPE)+1) # define PUT_CHAR(c) \ do { \ - if (MC_CUR_MAX == 1) \ + if (MB_CUR_MAX == 1) \ putchar (c); \ else \ printf ("%C", (wint_t) c); /* Should we use wide stream?? */ \ @@ -2338,7 +2338,8 @@ regex_compile (pattern, size, syntax, bufp) #ifdef MBS_SUPPORT /* Initialize the wchar_t PATTERN and offset_buffer. */ - p = pend = pattern = TALLOC(csize, CHAR_TYPE); + p = pend = pattern = TALLOC(csize + 1, CHAR_TYPE); + p[csize] = L'\0'; /* sentinel */ mbs_offset = TALLOC(csize + 1, int); is_binary = TALLOC(csize + 1, char); if (pattern == NULL || mbs_offset == NULL || is_binary == NULL) |