Unverified Commit 569eb78e by Christian Brauner Committed by Stéphane Graber

utils: use 1LU otherwise we overflow

parent a816c9c1
......@@ -1923,12 +1923,14 @@ bool task_blocking_signal(pid_t pid, int signal)
return bret;
while (getline(&line, &n, f) != -1) {
if (!strncmp(line, "SigBlk:\t", 8))
if (sscanf(line + 8, "%lx", &sigblk) != 1)
goto out;
if (strncmp(line, "SigBlk:\t", 8))
continue;
if (sscanf(line + 8, "%lx", &sigblk) != 1)
goto out;
}
if (sigblk & (1 << (signal - 1)))
if (sigblk & (1LU << (signal - 1)))
bret = true;
out:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment