[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:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user