projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
dns response handling: don't treat too many addresses as an error
[musl]
/
src
/
process
/
posix_spawn_file_actions_adddup2.c
diff --git
a/src/process/posix_spawn_file_actions_adddup2.c
b/src/process/posix_spawn_file_actions_adddup2.c
index
0367498
..
addca4d
100644
(file)
--- a/
src/process/posix_spawn_file_actions_adddup2.c
+++ b/
src/process/posix_spawn_file_actions_adddup2.c
@@
-5,6
+5,7
@@
int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *fa, int srcfd, int fd)
{
+ if (srcfd < 0 || fd < 0) return EBADF;
struct fdop *op = malloc(sizeof *op);
if (!op) return ENOMEM;
op->cmd = FDOP_DUP2;