X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=log.c;h=ab94832caaa726aaac76c1d3d5ca03a2629d42b2;hb=698280de07c723fed8c707e56bce81b66fee9c52;hp=f4ef8000605c866121031ecb4babf2965c2aa1ff;hpb=389070fed67552c613ce5afd3cdb436f8f8c538f;p=secnet.git diff --git a/log.c b/log.c index f4ef800..ab94832 100644 --- a/log.c +++ b/log.c @@ -19,17 +19,18 @@ static void vMessage(uint32_t class, const char *message, va_list args) FILE *dest=stdout; #define MESSAGE_BUFLEN 1023 static char buff[MESSAGE_BUFLEN+1]={0,}; - uint32_t bp; + size_t bp; char *nlp; if (secnet_is_daemon) { /* Messages go to the system log interface */ bp=strlen(buff); + assert(bp < MESSAGE_BUFLEN); vsnprintf(buff+bp,MESSAGE_BUFLEN-bp,message,args); /* Each line is sent separately */ while ((nlp=strchr(buff,'\n'))) { *nlp=0; - slilog(system_log,class,buff); + slilog(system_log,class,"%s",buff); memmove(buff,nlp+1,strlen(nlp+1)+1); } } else {