Incomplete status2d fragments protection

This commit is contained in:
bakkeby 2021-03-31 19:41:46 +02:00
parent 647c5935b3
commit 4b22fdc0c3

View File

@ -87,8 +87,8 @@ drawstatusbar(BarArg *a, char* stext)
char *text; char *text;
char *p; char *p;
Clr oldbg, oldfg; Clr oldbg, oldfg;
len = strlen(stext) + 1; len = strlen(stext);
if (!(text = (char*) malloc(sizeof(char)*len))) if (!(text = (char*) malloc(sizeof(char)*(len + 1))))
die("malloc"); die("malloc");
p = text; p = text;
#if BAR_STATUSCMD_PATCH #if BAR_STATUSCMD_PATCH
@ -203,6 +203,7 @@ drawstatusbar(BarArg *a, char* stext)
} }
text = text + i + 1; text = text + i + 1;
len -= i + 1;
i=-1; i=-1;
isCode = 0; isCode = 0;
} }