diff options
author | Bruno Haible <bruno@clisp.org> | 2019-06-10 16:50:04 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-06-10 17:24:58 +0200 |
commit | 765146c33361b46aa2c592e980b16069094c6000 (patch) | |
tree | b8cbb15b10cca39202340848c26b980ef838b068 /lib/spawn_int.h | |
parent | fbb40ec10e333cff0b9845572065edd9e66eac79 (diff) | |
download | gnulib-765146c33361b46aa2c592e980b16069094c6000.tar.gz |
posix_spawn_file_actions_addopen: Fix possible use-after-free bug.
Reported at <https://sourceware.org/bugzilla/show_bug.cgi?id=17048>.
* lib/spawn_int.h (struct __spawn_action): Remove 'const' from path.
* lib/spawn_faction_addopen.c (posix_spawn_file_actions_addopen): Make
a copy of the path argument.
* lib/spawn_faction_destroy.c (posix_spawn_file_actions_destroy): Free
it.
Diffstat (limited to 'lib/spawn_int.h')
-rw-r--r-- | lib/spawn_int.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spawn_int.h b/lib/spawn_int.h index 584c1bbcc3..08c477a9cb 100644 --- a/lib/spawn_int.h +++ b/lib/spawn_int.h @@ -42,7 +42,7 @@ struct __spawn_action struct { int fd; - const char *path; + char *path; int oflag; mode_t mode; } open_action; |