all repos — slstatus @ 4170970c85da252ee2061f81520581fb71f5e149

my build of slstatus (tools.suckless.org/slstatus/)

fixed strcat null possibility in main()
Aaron Marcher info@nulltime.net
Mon, 15 Aug 2016 13:08:34 +0200
commit

4170970c85da252ee2061f81520581fb71f5e149

parent

df928892e8dd689416cab464cc05284997c0c188

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M slstatus.cslstatus.c

@@ -689,6 +689,10 @@ for (size_t i = 0; i < sizeof(args) / sizeof(args[0]); ++i) {

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);