From 759965ee0897ca730908f39abfa70802b3f028ce Mon Sep 17 00:00:00 2001 From: Michael Rash Date: Fri, 10 Aug 2018 21:22:23 -0700 Subject: [PATCH] [server] fix UBSAN warning 'fwknopd.c:1044:50: runtime error: left shift of 2 by 30 places cannot be represented in type 'int'' --- server/fwknopd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/fwknopd.c b/server/fwknopd.c index 55e9c60d..d7b1abff 100644 --- a/server/fwknopd.c +++ b/server/fwknopd.c @@ -1041,7 +1041,7 @@ get_running_pid(const fko_srv_options_t *opts) buf[PID_BUFLEN-1] = '\0'; /* max pid value is configurable on Linux */ - rpid = (pid_t) strtol_wrapper(buf, 0, (2 << 30), + rpid = (pid_t) strtol_wrapper(buf, 0, (2 << 22), NO_EXIT_UPON_ERR, &is_err); if(is_err != FKO_SUCCESS) rpid = 0;