diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2014-06-24 00:21:54 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2014-06-24 00:21:54 +0400 |
commit | 4491d189ae389fcfa8ba909c5f53645a01dc6db8 (patch) | |
tree | f2e536a460e392fe6ac6cbd2f37a065f2bba7b2d /newlib/libc/ctype | |
parent | 8431e478d2f74ebf0bcfd2bc4c71e3c391fc7753 (diff) |
* libc/argz/envz_merge.c (envz_merge): Fix memory leak (Cygwin Coverity
Scan CID 60023).
* libc/ctype/iswalpha.c (iswalpha): Add bounds check to avoid
out-of-bounds read from utf8 tables (CID 59949).
* libc/locale/ldpart.c (__part_load_locale): Add 1 byte to size of lbuf.
Write NUL into the last byte to accommodate split_lines (CID 60047).
Diffstat (limited to 'newlib/libc/ctype')
-rw-r--r-- | newlib/libc/ctype/iswalpha.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/ctype/iswalpha.c b/newlib/libc/ctype/iswalpha.c index 16d424086..71f0e4a4b 100644 --- a/newlib/libc/ctype/iswalpha.c +++ b/newlib/libc/ctype/iswalpha.c @@ -415,7 +415,7 @@ _DEFUN(iswalpha,(c), wint_t c) /* otherwise c > *ptr */ /* look for 0x0 as next element which indicates a range */ ++ptr; - if (*ptr == 0x0) + if (ptr < table + size - 1 && *ptr == 0x0) { /* we have a range..see if c falls within range */ ++ptr; |