Mercurial > hg > octave-lyh > gnulib-hg
changeset 4792:f5c9bbb6cdc9
Fix address-arithmetic and alloca bugs in fnmatch.
exclude.c cleanups.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Thu, 16 Oct 2003 06:56:14 +0000 |
parents | c47569f6dfaa |
children | 43c03cffd8aa |
files | lib/ChangeLog |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,21 @@ +2003-10-15 Paul Eggert <eggert@twinsun.com> + + * exclude.c: Do not include <inttypes.h> or <stdint.h>. + (SIZE_MAX): Remove. + (new_exclude, add_exclude_file): Initial size no longer needs to + be a power of 2. + (add_exclude, add_exclude_file): Use xnrealloc instead of rolling + our own address arithmetic overflow checking. + + * fnmatch.c (SIZE_MAX): Define if standard headers don't. + (fnmatch): Do not alloca more than 2000 wide characters; + instead, use malloc for large buffers. + Check for address arithmetic overflow, and return -1 + with errno set to ENOMEM in that case. + * fnmatch_loop.c (ALLOCA_LIMIT): New macro. + (NEW_PATTERN): Do not alloca more than 8000 bytes; + instead, return -1. Check for address arithmetic overflow. + 2003-10-14 Paul Eggert <eggert@twinsun.com> Handle invalid suffixes and overflow independently, so that