Browse Source

Make sure we never pass a negative value to dup2(...)

ppa-0.6.1
practicalswift 7 years ago
committed by Rusty Russell
parent
commit
e56eee50c8
  1. 1
      lightningd/subd.c

1
lightningd/subd.c

@ -30,6 +30,7 @@
static bool move_fd(int from, int to)
{
assert(from >= 0);
if (dup2(from, to) == -1)
return false;
close(from);

Loading…
Cancel
Save