mirror of
https://passt.top/passt
synced 2025-05-29 12:35:33 +02:00
passt-repair: Fix off-by-one in check for number of file descriptors
Actually, 254 is too many, but 253 isn't. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
def7de4690
commit
836fe215e0
1 changed files with 1 additions and 1 deletions
|
@ -131,7 +131,7 @@ loop:
|
|||
/* No inverse formula for CMSG_LEN(x), and building one with CMSG_LEN(0)
|
||||
* works but there's no guarantee it does. Search the whole domain.
|
||||
*/
|
||||
for (i = 1; i < SCM_MAX_FD; i++) {
|
||||
for (i = 1; i <= SCM_MAX_FD; i++) {
|
||||
if (CMSG_LEN(sizeof(int) * i) == cmsg->cmsg_len) {
|
||||
n = i;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue