1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-07 22:34:18 +01:00

Coverity: fix potential buffer overflow

This commit is contained in:
David Maciejak
2023-02-28 21:24:31 +08:00
committed by Carlos R. Mafra
parent 7b317a5fba
commit d2d5297a1e
4 changed files with 4 additions and 4 deletions

View File

@@ -615,7 +615,7 @@ static void menu_parser_condition_ifmacro(WMenuParser parser, Bool check_exists)
((!check_exists) && (macro != NULL));
}
strcpy(parser->cond.stack[0].name, cmd_name);
strncpy(parser->cond.stack[0].name, cmd_name, sizeof(parser->cond.stack[0].name) - 1);
parser->cond.stack[0].line = parser->line_number;
}