Commit Graph

1205 Commits

Author SHA1 Message Date
Ulrich Drepper 798be72d12 Define SEEK_DATA and SEEK_HOLE 2011-07-23 21:45:57 -04:00
Ulrich Drepper 90bb2039e9 Check for overflows in expressions
Some passed in values might cause overflows in expressions.
2011-07-20 22:53:58 -04:00
Ulrich Drepper 01636b2140 Handle W; without long options in getopt 2011-07-06 21:27:14 -04:00
Roland McGrath 5615eaf264 Quash some new warnings from GCC 4.6. 2011-06-10 22:44:20 -07:00
Ulrich Drepper 8887a920a4 Fix unnecessary overallocation due to incomplete character
When incomplete characters are found at the end of a string the
code ran amok and allocated lots of memory.  Stricter limits
are now in place.
2011-05-28 17:14:30 -04:00
Ulrich Drepper 9ce9d0ec90 Remove unused variable 2011-05-28 14:43:43 -04:00
Ulrich Drepper f2962a7195 Add a few more alloca size checks 2011-05-22 23:04:16 -04:00
Reuben Thomas 78e64fdcaa Update documentation in regex.h 2011-05-20 09:14:03 -04:00
Aharon Robbins a4b89fd846 Update RE_SYNTAX*_AWK constants in regex.h 2011-05-16 10:28:44 -04:00
Ulrich Drepper bd25564e1e Provide more helpful error message in getopt
If provide with an ambiguous long option we now show all the possibilities.
2011-05-15 13:35:09 -04:00
Andreas Schwab 81a5726bd2 Add syncfs syscall. 2011-04-01 13:08:28 -04:00
Ulrich Drepper 4c1423edfb Fix typos in comments. 2011-04-01 10:39:30 -04:00
Ulrich Drepper 8126d90480 Check size of pattern in wide character representation in fnmatch. 2011-03-18 05:29:20 -04:00
Roland McGrath a0bf67cca2 Fix some warning nits. 2011-02-04 10:53:51 -08:00
Ulrich Drepper c0dafcf176 Update copyright year. 2011-01-17 15:08:10 -05:00
Ulrich Drepper 794c3ad3a4 FIx handling of unterminated [ expression in fnmatch. 2011-01-14 08:06:22 -05:00
Jim Meyering 2543fef229 Fix infloop on persistent failing calloc in regex. 2010-12-27 18:19:56 -05:00
Andreas Schwab 3540d66b66 Fix memory leak in fnmatch 2010-11-12 03:51:28 -05:00
Ulrich Drepper b833d51fbb One more regex memory leak fixed. 2010-10-12 09:00:33 -04:00
Ulrich Drepper e9b9cbf5e9 More regex memory leak fixes and tests. 2010-10-11 22:46:44 -04:00
Ulrich Drepper ef06edbee6 Test case for last regex problem. 2010-10-11 12:34:53 -04:00
Ulrich Drepper a129c80d54 Fix memory leak for some invalid regular expressions. 2010-10-11 11:46:22 -04:00
Ulrich Drepper dda51327ba Undo feature selection for ftruncate. 2010-09-21 11:01:10 -07:00
Roland McGrath 090555538d Rejigger header generation for default uname implementation. 2010-08-24 11:56:52 -07:00
Ulrich Drepper f15ce4d8dc Avoid too much stack use in fnmatch. 2010-08-09 21:09:37 -07:00
Ulrich Drepper ac2b484c02 Correct checking loop in group_member. 2010-06-19 11:38:04 -07:00
Jakub Jelinek f32f28695d Fix a couple of __REDIRECT () __THROW occurrences
This patch fixes some cases which fail to parse with C++.
2010-06-14 08:18:26 -07:00
Andreas Schwab d84acf388e Fix lookup of collation sequence value during regexp matching 2010-05-05 09:59:25 -07:00
Roland McGrath 3aa6513708 Fix tst-chmod not to write into srcdir. 2010-04-09 13:59:34 -07:00
Ulrich Drepper e326768467 Add tests for recent getopt changes. 2010-04-07 22:59:40 -07:00
Eric Blake 66b93be793 getopt mishandles optstring of "+:" 2010-04-07 17:56:20 -07:00
Eric Blake cf0b68196c getopt mistakenly allows '-;' as short option 2010-04-07 17:28:36 -07:00
Eric Blake aa7f642769 Fix -W with optional parameters in getopt.
According to the getopt documentation, if "W;" is part of optstring, then '-W
foo' should behave like '--foo'.  But if "foo" uses an optional_argument, this
is not the case, since optarg is not NULL when using -W.
2010-04-07 17:16:27 -07:00
Ulrich Drepper 247fdc8ee6 Fix printing error messages in getopt. 2010-04-04 22:48:55 -07:00
Ulrich Drepper ed08740859 Document problem with NATs in getaddrinfo. 2010-04-03 17:56:51 -07:00
Ulrich Drepper 0a164fe03e Whitespace fixes. 2010-03-27 06:19:03 -07:00
Ulrich Drepper a5f3b0f830 Fix one more issue with the glob patch. 2010-03-27 05:48:17 -07:00
Ulrich Drepper c27849fbbf Add test for last glob bug. 2010-03-24 12:10:51 -07:00
Ulrich Drepper 8f2e399413 Fix glob with empty pattern 2010-03-24 11:58:05 -07:00
Ulrich Drepper 561470e061 Update copyright year. 2010-03-15 11:50:59 -07:00
Paul Eggert aef699dce1 regexec.c: avoid overflow in realloc buffer length computation 2010-01-22 12:41:12 -08:00
Paul Eggert 74bc9f14db regexec.c: avoid leaks on out-of-memory failure paths 2010-01-22 12:33:58 -08:00
Paul Eggert 42a2c9b5c3 regexec.c: avoid overflow in computing sum of lengths 2010-01-22 12:22:18 -08:00
Paul Eggert eadc09f22c re_search_internal: Avoid overflow in computing re_malloc buffer size 2010-01-22 12:15:53 -08:00
Paul Eggert 4cd028677b prune_impossible_nodes: Avoid overflow in computing re_malloc buffer size 2010-01-22 12:03:56 -08:00
Paul Eggert daa8454919 regexec.c: avoid arithmetic overflow in buffer size calculation 2010-01-22 10:52:38 -08:00
Paul Eggert d044d844dd regexec.c: simplify re_search_2_stub 2010-01-22 10:39:59 -08:00
Ulrich Drepper 5ddf954cf1 Simplify test in re_string_skip_chars. 2010-01-22 10:22:53 -08:00
Ulrich Drepper 4f08104cbf regex_internal.c: don't assume WEOF fits in wchar_t 2010-01-22 10:17:45 -08:00
Ulrich Drepper 0dae5d4ec1 regex_internal.c: remove useless variable and the code to set it. 2010-01-22 09:57:30 -08:00
Ulrich Drepper 2236464488 Extend overflow detection in re_dfa_add_node. 2010-01-22 09:48:35 -08:00
Ulrich Drepper 54dd0ab31f regex: avoid internal re_realloc overflow 2010-01-22 09:33:01 -08:00
Ulrich Drepper aa732e2b2b One forgotten checkin from regex changes. 2010-01-15 12:20:55 -08:00
Ulrich Drepper 2da42bc065 Fix a few more cases of ignored return values in regex. 2010-01-15 12:03:16 -08:00
Paul Eggert 21f5de55ec regcomp.c: do not ignore memory allocation failure 2010-01-14 21:35:15 -08:00
Ulrich Drepper 6a7007d7be Relax conditions in unistd.h. 2010-01-14 16:23:47 -08:00
Ulrich Drepper 52e2ea9a83 Relax visibility of some more declaration. 2010-01-14 13:22:06 -08:00
Ulrich Drepper b1a6644267 Declare getpagesize in _GNU_SOURCE mode again. 2010-01-14 09:14:12 -08:00
Ulrich Drepper 25fdd5d134 Fix up sched.h for XPG7. 2010-01-12 11:48:45 -08:00
Jakub Jelinek 8500fa8325 Fix compile error with sys/wait.h. 2010-01-12 05:41:52 -08:00
Ulrich Drepper 21487cc929 Fix handling symbols removed in XPG7. 2010-01-11 14:49:17 -08:00
Ulrich Drepper 7cdb5a32f9 Fix up unistd.h for XPG7. 2010-01-11 14:43:46 -08:00
Ulrich Drepper 99d46ae379 Fix up sys/wait.h header for XPG7. 2010-01-10 11:06:06 -08:00
Ulrich Drepper f9cfa295ae Fix up sys/types.h for XPG7.
Also fix a test.
2010-01-10 07:16:54 -08:00
Ulrich Drepper df06f4855e Fix glob.h for XPG7. 2010-01-10 06:37:41 -08:00
Ulrich Drepper f095bb7204 Add support for XPG7 testing.
The header conformance testing code needed extending for XPG7.  This
exposed a few bugs in the headers.  There are more changes to come.
2010-01-09 10:56:41 -08:00
Bruno Haible 4940d71bef Add more warnings to exec functions. 2009-12-09 08:30:38 -08:00
Ulrich Drepper 3933378fd3 Whitespace fixes. 2009-11-17 16:24:26 -08:00
Paolo Bonzini 815d8147a3 Fix ranges with multibyte characters as endpoints.
This is another bug in computing the fastmap.  It was reported by a user
of sed because it usually does not happen with !_LIBC.  However, it is
there in that case too.

The bug is that whenever we have a range at the beginning of the regex,
the regex must be tested on any possible multibyte character.  The reason
why _LIBC masks it, is that in general there is a collation symbol for
each possible multibyte-character lead byte, so all the lead bytes are
in general already part of the fastmap.

The tests use cyrillic characters as an example.  With _LIBC, they pass
without the patch too, but you can make them fail by removing collation
symbols handling.
2009-11-17 16:23:24 -08:00
Mike Frsyinger 5ec794b4b5 Add missing stdio.h include. 2009-11-14 19:11:44 -08:00
Ulrich Drepper 02bf610ca8 Handle -- on getconf command line. 2009-09-09 22:15:27 -07:00
Ulrich Drepper d76da20f7f Handle POSIX2_LINE_MAX in getconf. 2009-09-07 00:18:06 -07:00
Ulrich Drepper a1ed6c284a Extend last test case. 2009-08-23 16:03:48 -07:00
Ulrich Drepper 8a7cea0199 Add test case for last fixed regex bug. 2009-08-23 15:33:40 -07:00
Ulrich Drepper 52db8039f5 Recognize ill-formed { } expressions in regcomp. 2009-08-23 15:22:00 -07:00
Ulrich Drepper bdc7f5d76b Also correct _POSIX2_* constants in case older standards are selected. 2009-08-23 14:55:51 -07:00
Ulrich Drepper c6b6723e6b Define _POSIX_VERSION correctly when older POSIX versions are selected. 2009-08-23 12:27:09 -07:00
Ulrich Drepper 666a9871f7 Avoid warnings in test cases.
The posix/tst-rfc3484* test cases caused warnings in newer gccs
because the unused but copied sin_zero part of sockaddr_in wasn't
explicitly initialized.
2009-07-23 12:53:50 -07:00
Andreas Schwab f60ddf9bf7 Don't treat bug reporting message as a format string. 2009-06-16 20:34:55 -07:00
Ulrich Drepper 395a37e379 When iterating over CPU bitmask, don't try more than CPU_SETSIZE. 2009-06-15 21:12:57 -07:00
Ulrich Drepper 3d5243d416 Implement execvpe.
There is some existing practice in other OSes and it's trivial to
implement giving the existing code.  Fixes BZ #10221.
2009-06-02 07:03:02 -07:00
Ulrich Drepper c457bc139e Fix typos and pretty printing in sys/wait.h. 2009-05-16 12:47:15 -07:00
Andreas Schwab ff6ff38db2 Remove redundant .gitignore files. 2009-05-16 10:18:34 +02:00
Jim Meyering 2e180a2622 rename each .cvsignore file to .gitignore 2009-05-15 18:13:37 +02:00
Ulrich Drepper 27be9b9217 * posix/bits/posix1_lim.h: Cleanup namespace a bit. 2009-04-26 06:18:19 +00:00
Ulrich Drepper 7db0cc4245 * posix/unistd.h (_POSIX_VERSION, _POSIX2_VERSION, _POSIX2_C_BIND,
_POSIX2_C_DEV, _POSIX2_SW_DEV, _POSIX2_LOCALEDEF): Define to
	200809L instead of 200112L.
	(_XOPEN_VERSION): For __USE_XOPEN2K8 define to 700.
	* posix/tst-sysconf.c (STDVER): Define to 200809L instead of 200112L.

2009-03-10  Jakub Jelinek  <jakub@redhat.com>
2009-03-10 13:45:44 +00:00
Ulrich Drepper 6cbe890a9d * wctype/wctype.h: The *_l functions are in POSIX 2008.
* wcsmbs/wchar.h: mbsnrtowcs, open_wmemstream, wcpcpy, wcpncpy,
	wcscasecmp, wcsdup, wcsncasecmp, wcsnlen, wcsnrtombs,
	wcscasecmp_l, wcsncasecmp_l, wcscoll_l, and wcsxfrm_l.
	* sysdeps/mach/hurd/bits/posix_opt.h: Reset value of macros from
	200112L to 200809L.
	* sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
	* posix/getconf.c (vars): Add _SC_THREAD_ROBUST_PRIO_INHERIT and
	_SC_THREAD_ROBUST_PRIO_PROTECT entries.
	* bits/confname.h: Add _SC_THREAD_ROBUST_PRIO_INHERIT and
	_SC_THREAD_ROBUST_PRIO_PROTECT.
	* posix/unistd.h: fexecve is in POSIX 2008.
	* time/time.h: strftime_l is in POSIX 2008.
	* io/sys/stat.h: futimens is in POSIX 2008.
	* string/strings.h: strcasecmp_l and strncasecmp_l are in POSIX 2008.
	* string/string.h: stpcpy, stpncpy, strndup, strnlen, strsignal,
	strcoll_l, strerror_l, and strxfrm_l are in POSIX 2008.
	* stdlib/stdlib.h: mkdtemp is in POSIX 2008.
2009-02-26 16:53:30 +00:00
Ulrich Drepper 2e6d6bacc2 * include/features.h: If no feature selection given and we select
by default a POSIX mode, also define __USE_POSIX_IMPLICITLY.
	* posix/Versions: Export __posix_getopt.
	* posix/getopt.c (_getopt_initialize): Take additional parameter.
	Use it to alternatively initialize __posixly_correct.
	(_getopt_internal_r): Take addition parameter.  Pass on to
	_getopt_initialize.
	(_getopt_internal): Take addition parameter.  Pass on to
	_getopt_internal_r.
	(getopt): Pass additional zero to _getopt_internal.
	(__posix_getopt): New function.
	* posix/getopt.h: Add redirection for getopt.
	* posix/getopt1.c (getopt_long): Pass additional zero to
	_getopt_internal.
	(getopt_long_only): Likewise.
	(_getopt_long_r): Pass additional zero to _getopt_internal_r.
	(_getopt_long_only_r): Likewise.
	* posix/getopt_int.h: Adjust declarations of _getopt_internal and
	_getopt_internal_r.
2009-02-26 01:22:06 +00:00
Jakub Jelinek d82a27f841 * stdlib/monetary.h: Uglify function parameter names.
* sunrpc/rpc/pmap_clnt.h: Likewise. 
* sunrpc/rpc/svc.h: Likewise. 
* sunrpc/rpc/xdr.h: Likewise. 
* sunrpc/rpc/clnt.h: Likewise. 
* resolv/netdb.h: Likewise. 
* resolv/arpa/nameser.h: Likewise. 
* resolv/resolv.h: Likewise. 
* argp/argp.h: Likewise. 
* locale/langinfo.h: Likewise. 
* io/sys/stat.h: Likewise. 
* posix/spawn.h: Likewise. 
* nis/rpcsvc/nislib.h: Likewise. 
* malloc/obstack.h: Likewise. 
* sysdeps/ia64/bits/link.h: Likewise. 
* sysdeps/i386/bits/link.h: Likewise. 
* sysdeps/s390/bits/link.h: Likewise. 
* sysdeps/powerpc/bits/link.h: Likewise. 
* sysdeps/x86_64/bits/link.h: Likewise. 
* sysdeps/sparc/bits/link.h: Likewise. 
* sysdeps/sh/bits/link.h: Likewise. 
* sysdeps/unix/sysv/linux/i386/sys/io.h: Likewise. 
* sysdeps/unix/sysv/linux/x86_64/sys/io.h: Likewise. 
* sysdeps/unix/sysv/linux/sparc/sys/eventfd.h: Likewise. 
* sysdeps/unix/sysv/linux/sys/eventfd.h: Likewise.
2009-02-16  Jakub Jelinek  <jakub@redhat.com>

	* stdlib/monetary.h: Uglify function parameter names.
	* sunrpc/rpc/pmap_clnt.h: Likewise.
	* sunrpc/rpc/svc.h: Likewise.
	* sunrpc/rpc/xdr.h: Likewise.
	* sunrpc/rpc/clnt.h: Likewise.
	* resolv/netdb.h: Likewise.
	* resolv/arpa/nameser.h: Likewise.
	* resolv/resolv.h: Likewise.
	* argp/argp.h: Likewise.
	* locale/langinfo.h: Likewise.
	* io/sys/stat.h: Likewise.
	* posix/spawn.h: Likewise.
	* nis/rpcsvc/nislib.h: Likewise.
	* malloc/obstack.h: Likewise.
	* sysdeps/ia64/bits/link.h: Likewise.
	* sysdeps/i386/bits/link.h: Likewise.
	* sysdeps/s390/bits/link.h: Likewise.
	* sysdeps/powerpc/bits/link.h: Likewise.
	* sysdeps/x86_64/bits/link.h: Likewise.
	* sysdeps/sparc/bits/link.h: Likewise.
	* sysdeps/sh/bits/link.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/sys/io.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sys/io.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sys/eventfd.h: Likewise.
	* sysdeps/unix/sysv/linux/sys/eventfd.h: Likewise.
2009-02-16 21:00:15 +00:00
Ulrich Drepper 26b62243ee [BZ #7095]
2009-02-06  Ulrich Drepper  <drepper@redhat.com>
	[BZ #7095]
	* bits/confname.h: Add SUSv7 macros for getconf environments.
	* bits/environments.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/bits/environments.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/environments.h: Likewise.
	* sysdeps/unix/sysv/linux/s390/bits/environments.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/environments.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/bits/environments.h: Likewise.
	* posix/confstr.c: Handle SUSv5 and SUSv7 environments.
	* posix/getconf.c: Likewise.
	* posix/sysconf.c: Likewise.
	* sysdeps/posix/sysconf.c: Likewise.
	* posix/Makefile (getconf.speclist): Also collect SUSv5 and SUSv7
	environments.
2009-02-07 08:19:29 +00:00
Ulrich Drepper cbbcaf2369 * debug/xtrace.sh: Unify translatable messages.
* elf/ldd.bash.in: Likewise.
	* elf/sprof.c: Likewise.
	* locale/programs/locale.c: Likewise.
	* malloc/memusage.sh: Likewise.
	* nss/getent.c: Likewise.

2009-02-06  Joseph Myers  <joseph@codesourcery.com>

	* debug/pcprofiledump.c (print_version,
	argp_program_version_hook): New function.
	* elf/ldconfig.c (more_help): New function.
	(argp): Use it.
	* elf/sln.c (usage): New function.
	(main): Support --help and --version.
	* malloc/memusagestat.c (print_version): New function.
	(argp_program_version_hook): New variable.
	* nscd/nscd.c (more_help): New function.
	(argp): Use it.
	* posix/getconf.c (main): Send --version output to stdout.
	Support --help.
	* sunrpc/rpc_main.c (usage, options_usage): Take STREAM and STATUS
	arguments.  All callers changed.
	(print_version): New function.
	(parseargs): Support --help and --version.
	* sunrpc/rpcinfo.c (usage): Take STREAM argument.  All callers
	changed.
	(print_version): New function.
	(main): Use getopt_long.  Support --help and --version.
	* sysdeps/unix/sysv/linux/lddlibc4.c (main): Support --help and
	--version.

2009-02-06  Ulrich Drepper  <drepper@redhat.com>
2009-02-06 20:13:07 +00:00
Ulrich Drepper 76c7f2cd8a [BZ 697]
* posix/regexec.c (prune_impossible_nodes): Handle sifted_states[0]
	being NULL also if there are no backreferences.
	* posix/rxspencer/tests: Add testcases.
2009-01-08 00:47:30 +00:00
Ulrich Drepper bdb56bacd5 [BZ 9697]
* posix/bug-regex17.c: Add testcases.
	* posix/regcomp.c (re_compile_fastmap_iter): Rewrite COMPLEX_BRACKET
	handling.
2009-01-08 00:42:51 +00:00
Ulrich Drepper b3918c7d7f * posix/regcomp.c (re_compile_fastmap_iter): Use __mbrtowc.
* posix/regex_internal.c (build_wcs_buffer, build_wcs_upper_buffer,
	re_string_skip_chars, re_string_reconstruct): Likewise.
	* posix/regex_internal.h [!_LIBC] (__mbrtowc): New #define.
2009-01-08 00:23:09 +00:00
Ulrich Drepper d36ad87147 * posix/getconf.c: Update copyright year.
* nss/getent.c: Likewise.
	* iconv/iconvconfig.c: Likewise.
	* iconv/iconv_prog.c: Likewise.
	* elf/ldconfig.c: Likewise.
	* catgets/gencat.c: Likewise.
	* csu/version.c: Likewise.
	* elf/ldd.bash.in: Likewise.
	* elf/sprof.c (print_version): Likewise.
	* locale/programs/locale.c: Likewise.
	* locale/programs/localedef.c: Likewise.
	* nscd/nscd.c (print_version): Likewise.
	* debug/xtrace.sh: Likewise.
	* malloc/memusage.sh: Likewise.
	* malloc/mtrace.pl: Likewise.
	* debug/catchsegv.sh: Likewise.
2009-01-02 08:47:18 +00:00
Ulrich Drepper f3721ab2dc * posix/globtest.sh: Use mktemp to create temporary file and
directory.
2008-12-06 06:05:54 +00:00
Ulrich Drepper 261d16fece * posix/regex_internal.h (build_wcs_upper_buffer):
Return type is reg_error_t.
2008-12-06 00:13:04 +00:00
Ulrich Drepper 6f576bf61a [BZ #6919]
2008-10-31  Ulrich Drepper  <drepper@redhat.com>
	[BZ #6919]
	* posix/spawnattr_getschedparam.c (posix_spawnattr_getschedparam):
	Fix length of copy operation.
2008-10-31 18:51:08 +00:00
Ulrich Drepper 4bed549a22 [BZ #6980]
* debug/getgroups_chk.c (__getgroups_chk): Return EINVAL error for
	negative sizees.
	* posix/bits/unistd.h (getgroups): Call __getgroups_chk for
	negative __size.
2008-10-31 14:27:36 +00:00
Ulrich Drepper e038616f4a * posix/wordexp.c (exec_comm): Use pipe2 if possible to create
file descriptors with close-on-exec set.
	(exec_comm_child): Fix the case where the write end of the pipe is
	STDOUT_FILENO already.  In case it is, clear close-on-exec.
2008-07-27 19:08:19 +00:00