To fix the bug caused by a Size value that is too large and leads to an array that requires excessive memory, which subsequently results in the failure of rpcbind to start properly. Signed-off-by: Zhuohao Bai <zhuohao_bai@xxxxxxxxxxx> --- src/rpc_dtablesize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc_dtablesize.c b/src/rpc_dtablesize.c index bce97e8..12f80c1 100644 --- a/src/rpc_dtablesize.c +++ b/src/rpc_dtablesize.c @@ -41,7 +41,7 @@ _rpc_dtablesize(void) static int size; if (size == 0) { - size = sysconf(_SC_OPEN_MAX); + size = min(1024, sysconf(_SC_OPEN_MAX)); } return (size); } -- 2.25.1