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:
committed by
Carlos R. Mafra
parent
7b317a5fba
commit
d2d5297a1e
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user