slstatus

My fork of https://tools.suckless.org/slstatus/
git clone https://git.inz.fi/slstatus
Log | Files | Refs | README | LICENSE

commit 4170970c85da252ee2061f81520581fb71f5e149
parent df928892e8dd689416cab464cc05284997c0c188
Author: Aaron Marcher <info@nulltime.net>
Date:   Mon, 15 Aug 2016 13:08:34 +0200

fixed strcat null possibility in main()

Diffstat:
Mslstatus.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/slstatus.c b/slstatus.c @@ -689,6 +689,10 @@ main(void) argument = args[i]; char *res = argument.func(argument.args); char *element = smprintf(argument.format, res); + if (element == NULL) { + element = smprintf("n/a"); + fprintf(stderr, "Failed to format output."); + } strcat(status_string, element); free(res); free(element);