Skip to content

Commit 8261376

Browse files
committed
wildcards: add some warnings for pitfalls
1 parent 77a4693 commit 8261376

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

web/docs/c.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ link [w]setargv.obj to your program. By default it is not enabled. For more
77
details see
88
https://learn.microsoft.com/en-us/cpp/c-language/expanding-wildcard-arguments
99

10+
Note that enabling wildcard expansion can have usability and security
11+
implications:
12+
13+
* The program might transform the arguments you passed in, depending on the
14+
current directory, leading to user confusion.
15+
* The program might leak information about the existence and names of files on
16+
the filesystem.
17+
* Input validation might be bypassed if wildcard expansions is not taken into
18+
account.
19+
1020
With mingw-w64, there are three ways wildcard expansion can be configured:
1121

1222
1. You can set `_dowildcard` in your source code to either `0` or `-1` to disable or enable wildcard expansion.

0 commit comments

Comments
 (0)