projects
/
suckless
/
slstatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9f738b
)
extern/concat.h: don't segfault if count == 0
author
raiz
<raiz@firemail.cc>
Tue, 27 Dec 2016 17:18:33 +0000
(20:18 +0300)
committer
raiz
<raiz@firemail.cc>
Tue, 27 Dec 2016 17:18:33 +0000
(20:18 +0300)
extern/concat.h
patch
|
blob
|
history
diff --git
a/extern/concat.h
b/extern/concat.h
index 7f2ea46a2d0470a0ee647029d815718abe25be36..0f3be9981bc57ae77c01d309b2e795abbe1e307b 100644
(file)
--- 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));