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:10:57 +0000 (17:10 -0400)
commit5dbd97426d568a2a05d94614085cb1cdd8527819
treec59098abb322a13e49be1b71f447e275691d5fed
parent5fad4ed508b20b7850dc8333c55afeed6737d08c
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.025343 seconds and 4 git commands to generate.