Fix: initialize temporary fd array element to -1
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 27 Apr 2021 01:07:08 +0000 (21:07 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 28 Apr 2021 21:33:50 +0000 (17:33 -0400)
commit9cf55c3c24472f49abac1957ae625190bb95b48d
treec59098abb322a13e49be1b71f447e275691d5fed
parent5779a46792cd521de19962185f063e73da835eed
Fix: initialize temporary fd array element to -1

These are FDs, an initialization value of zero is a valid FD number
hence we must initialize the element to -1.

This allows us to be more strict in `add_fds_to_payload` and assert that
the passed FDs are actual FDs and not only bare zero-initialized
element.

Change-Id: Icc05d98d51906636362a67588d7c42b58cf33ded
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/unix.c
This page took 0.025203 seconds and 4 git commands to generate.