1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

posix_spawn_file_actions_addopen needs to copy the path argument (BZ 17048)

POSIX requires that we make a copy, so we allocate a new string
and free it in posix_spawn_file_actions_destroy.

Reported by David Reid, Alex Gaynor, and Glyph Lefkowitz.  This bug
may have security implications.
This commit is contained in:
Florian Weimer
2014-06-11 23:12:52 +02:00
parent c3a2ebe1f7
commit 89e435f355
6 changed files with 54 additions and 8 deletions

View File

@ -22,7 +22,7 @@ struct __spawn_action
struct
{
int fd;
const char *path;
char *path;
int oflag;
mode_t mode;
} open_action;