slstatus

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

commit ba0f0998d9e782714f1007ca3e812403e5a4d0f7
parent e9f738b8b6afa1d94db666d657319e0b5647cb1f
Author: raiz <raiz@firemail.cc>
Date:   Tue, 27 Dec 2016 20:18:33 +0300

extern/concat.h: don't segfault if count == 0

Diffstat:
Mextern/concat.h | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/extern/concat.h b/extern/concat.h @@ -11,6 +11,9 @@ ccat(const unsigned short int count, ...) unsigned short int i; concat[0] = '\0'; + if (count == 0) + return; + va_start(ap, count); for(i = 0; i < count; i++) strlcat(concat, va_arg(ap, char *), sizeof(concat));