mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 04:49:25 +08:00
newlib: wordexp: drop dangerous fprintf
wordexp uses fprintf in a dangerous way. It uses an unchecked input string as format string, rather than as parameter to a %s. Replace fprintf with fputs. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
8bfb1afd6b
commit
5ace9004d9
@ -127,9 +127,9 @@ wordexp(const char *__restrict words, wordexp_t *__restrict pwordexp, int flags)
|
||||
|
||||
if (flags & WRDE_SHOWERR)
|
||||
{
|
||||
fprintf(stderr, tmp);
|
||||
fputs(tmp, stderr);
|
||||
while(fgets(tmp, MAXLINELEN, f_err))
|
||||
fprintf(stderr, tmp);
|
||||
fputs(tmp, stderr);
|
||||
}
|
||||
|
||||
goto cleanup;
|
||||
|
Loading…
x
Reference in New Issue
Block a user