Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-10-12 00:39:53 +0400
committerRussell Belfer <rb@github.com>2012-10-15 23:54:46 +0400
commitd5a51910678f8aea2b7efe077efc678141762dfc (patch)
tree7fa2ed6a8c21a464ce28cb6323c7e36ef47c2131 /src/fnmatch.h
parent824d5e4d260fc740dbe9251008439b9e58db5f19 (diff)
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.h7
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