1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 21:38:00 +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

@@ -203,7 +203,7 @@ static WMPropList *makeWindowState(WWindow * wwin, WApplication * wapp)
command = GetCommandForWindow(win);
if (!command) {
if (wapp->app_icon && wapp->app_icon->command) {
command = wmalloc(strlen(wapp->app_icon->command));
command = wmalloc(strlen(wapp->app_icon->command) + 1);
strcpy(command, wapp->app_icon->command);
} else
return NULL;