Commit 842404a7 by Serge Hallyn Committed by GitHub

Merge pull request #1630 from brauner/2017-06-20/fix_siblk_detection

utils: use 1LU otherwise we overflow
parents 71e4d99c 6fbcbe3b
......@@ -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