aboutsummaryrefslogtreecommitdiff
path: root/src/listener.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/listener.c')
-rw-r--r--src/listener.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/listener.c b/src/listener.c
index 2960dab..230205b 100644
--- a/src/listener.c
+++ b/src/listener.c
@@ -295,7 +295,7 @@ listener_kve_init(char **kve, int kvn, listener_t *lp, ...)
295 int i = 0; 295 int i = 0;
296 static char linebuf[64]; 296 static char linebuf[64];
297 va_list ap; 297 va_list ap;
298 char *p; 298 char *kw, *val;
299 299
300 if (kvn < KVE_MINSIZE) { 300 if (kvn < KVE_MINSIZE) {
301 diag(LOG_CRIT, "%s:%d: INTERNAL ERROR", __FILE__, __LINE__); 301 diag(LOG_CRIT, "%s:%d: INTERNAL ERROR", __FILE__, __LINE__);
@@ -313,14 +313,14 @@ listener_kve_init(char **kve, int kvn, listener_t *lp, ...)
313 kve[i++] = linebuf; 313 kve[i++] = linebuf;
314 314
315 va_start(ap, lp); 315 va_start(ap, lp);
316 while ((p = va_arg(ap,char*))) { 316 while ((kw = va_arg(ap,char*)) && (val = va_arg(ap,char*))) {
317 if (i == kvn) { 317 if (i + 2 >= kvn) {
318 diag(LOG_CRIT, "%s:%d: INTERNAL ERROR", 318 diag(LOG_CRIT, "%s:%d: INTERNAL ERROR",
319 __FILE__, __LINE__); 319 __FILE__, __LINE__);
320 abort(); 320 abort();
321 } 321 }
322 if (p) 322 kve[i++] = kw;
323 kve[i++] = p; 323 kve[i++] = val;
324 } 324 }
325 va_end(ap); 325 va_end(ap);
326 kve[i] = NULL; 326 kve[i] = NULL;
@@ -477,7 +477,7 @@ listener_print_status(listener_t *lp)
477static int 477static int
478runaction(listener_t *lp, action_t *act, event_t *evt) 478runaction(listener_t *lp, action_t *act, event_t *evt)
479{ 479{
480 char *kve[KVE_MINSIZE + 7]; 480 char *kve[KVE_MINSIZE + 8];
481 char codebuf[64]; 481 char codebuf[64];
482 char statbuf[64]; 482 char statbuf[64];
483 char pidbuf[80], *pid; 483 char pidbuf[80], *pid;

Return to:

Send suggestions and report system problems to the System administrator.