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
@@ -997,7 +997,7 @@ static void updateWorkspaceNames(WScreen *scr)
|
||||
len = 0;
|
||||
for (i = 0; i < scr->workspace_count; i++) {
|
||||
curr_size = strlen(scr->workspaces[i]->name);
|
||||
strcpy(pos, scr->workspaces[i]->name);
|
||||
strncpy(pos, scr->workspaces[i]->name, sizeof(pos) - 1);
|
||||
pos += (curr_size + 1);
|
||||
len += (curr_size + 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user