mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
Fixed buffer size.
This commit is contained in:
committed by
Carlos R. Mafra
parent
41193bdacd
commit
a12f0d453a
@@ -1392,7 +1392,7 @@ void wClipIconPaint(WAppIcon *aicon)
|
|||||||
WMColor *color;
|
WMColor *color;
|
||||||
Window win = aicon->icon->core->window;
|
Window win = aicon->icon->core->window;
|
||||||
int length, nlength;
|
int length, nlength;
|
||||||
char *ws_name, ws_number[10];
|
char *ws_name, ws_number[sizeof scr->current_workspace * CHAR_BIT / 3 + 1];
|
||||||
int ty, tx;
|
int ty, tx;
|
||||||
|
|
||||||
wIconPaint(aicon->icon);
|
wIconPaint(aicon->icon);
|
||||||
@@ -1400,7 +1400,7 @@ void wClipIconPaint(WAppIcon *aicon)
|
|||||||
length = strlen(workspace->name);
|
length = strlen(workspace->name);
|
||||||
ws_name = wmalloc(length + 1);
|
ws_name = wmalloc(length + 1);
|
||||||
snprintf(ws_name, length + 1, "%s", workspace->name);
|
snprintf(ws_name, length + 1, "%s", workspace->name);
|
||||||
snprintf(ws_number, sizeof(ws_number), "%i", scr->current_workspace + 1);
|
snprintf(ws_number, sizeof ws_number, "%u", scr->current_workspace + 1);
|
||||||
nlength = strlen(ws_number);
|
nlength = strlen(ws_number);
|
||||||
|
|
||||||
if (wPreferences.flags.noclip || !workspace->clip->collapsed)
|
if (wPreferences.flags.noclip || !workspace->clip->collapsed)
|
||||||
|
|||||||
Reference in New Issue
Block a user