2 ms·
Turns out this is actually documented in the manpage for wordexp()! (And refers to the mentioned fact that it now calls 'sh' directly.) > BUGS > Do not pass u
by jslabovitz 8y ago
Turns out this is actually documented in the manpage for wordexp()! (And refers to the mentioned fact that it now calls 'sh' directly.)
> BUGS
> Do not pass untrusted user data to wordexp(), regardless of whether the WRDE_NOCMD flag is set. The wordexp() function attempts to detect input that would cause commands to be executed before passing it to the shell but it does not use the same parser so it may be fooled.
> The current wordexp() implementation does not recognize multibyte characters, since the shell (which it invokes to perform expansions) does not.