[server] fix UBSAN warning 'fwknopd.c:1044:50: runtime error: left shift of 2 by 30 places cannot be represented in type 'int''

This commit is contained in:
Michael Rash
2018-08-10 21:22:23 -07:00
parent a7fc73b111
commit 759965ee08
+1 -1
View File
@@ -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;