Commit 88e15ce4 authored by Rickard Strandqvist's avatar Rickard Strandqvist Committed by Linus Torvalds

Documentation/accounting/getdelays.c: add missing null-terminate after strncpy call

Added a guaranteed null-terminate after call to strncpy.

This was partly found using a static code analysis program called
Signed-off-by: default avatarRickard Strandqvist <>
Acked-by: default avatarKees Cook <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent b6226b45
......@@ -314,6 +314,7 @@ int main(int argc, char *argv[])
case 'm':
strncpy(cpumask, optarg, sizeof(cpumask));
cpumask[sizeof(cpumask) - 1] = '\0';
maskset = 1;
printf("cpumask %s maskset %d\n", cpumask, maskset);
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