diff options
author | Russell Belfer <rb@github.com> | 2012-10-11 13:39:53 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-10-15 12:54:46 -0700 |
commit | d5a51910678f8aea2b7efe077efc678141762dfc (patch) | |
tree | 7fa2ed6a8c21a464ce28cb6323c7e36ef47c2131 /src/fnmatch.h | |
parent | 824d5e4d260fc740dbe9251008439b9e58db5f19 (diff) | |
download | libgit2-d5a51910678f8aea2b7efe077efc678141762dfc.tar.gz |
Import DOS fix for fnmatch
Because fnmatch uses recursion, there were some input sequences
that cause seriously degenerate behavior. This imports a fix
that imposes a max recursion limiter to avoid the worst of it.
Diffstat (limited to 'src/fnmatch.h')
-rw-r--r-- | src/fnmatch.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fnmatch.h b/src/fnmatch.h index 7faef09b3..913efd1a0 100644 --- a/src/fnmatch.h +++ b/src/fnmatch.h @@ -11,12 +11,13 @@ #define FNM_NOMATCH 1 /* Match failed. */ #define FNM_NOSYS 2 /* Function not supported (unused). */ +#define FNM_NORES 3 /* Out of resources */ -#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */ -#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */ +#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */ +#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */ #define FNM_PERIOD 0x04 /* Period must be matched by period. */ #define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */ -#define FNM_CASEFOLD 0x10 /* Case insensitive search. */ +#define FNM_CASEFOLD 0x10 /* Case insensitive search. */ #define FNM_IGNORECASE FNM_CASEFOLD #define FNM_FILE_NAME FNM_PATHNAME |