]> Savannah Git Hosting - gnulib.git/commit
posix_spawn_file_actions_addopen: Fix possible use-after-free bug.
authorBruno Haible <bruno@clisp.org>
Mon, 10 Jun 2019 14:50:04 +0000 (16:50 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 10 Jun 2019 15:24:58 +0000 (17:24 +0200)
commit765146c33361b46aa2c592e980b16069094c6000
treeb8cbb15b10cca39202340848c26b980ef838b068
parentfbb40ec10e333cff0b9845572065edd9e66eac79
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.
ChangeLog
lib/spawn_faction_addopen.c
lib/spawn_faction_destroy.c
lib/spawn_int.h