mirror of
https://github.com/mirror/wget.git
synced 2025-01-03 00:40:28 +08:00
* src/utils.c (compile_posix_regex): Hard-code string to regcomp
regcomp() may be too cpu + memory intensive for fuzzing. See https://sourceware.org/glibc/wiki/Security%20Exceptions
This commit is contained in:
parent
e737c4b10e
commit
64758655c4
@ -2444,6 +2444,11 @@ void *
|
||||
compile_posix_regex (const char *str)
|
||||
{
|
||||
regex_t *regex = xmalloc (sizeof (regex_t));
|
||||
#ifdef TESTING
|
||||
/* regcomp might be *very* cpu+memory intensive,
|
||||
* see https://sourceware.org/glibc/wiki/Security%20Exceptions */
|
||||
str = "a";
|
||||
#endif
|
||||
int errcode = regcomp ((regex_t *) regex, str, REG_EXTENDED | REG_NOSUB);
|
||||
if (errcode != 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user