X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/ba72e2bf5e1a1cedc74f7de35e29cce7a0f4fca1..b7164ab60bf28a93fc02bb65b784134fcbbc41c5:/log.c diff --git a/log.c b/log.c index 4f1b651..9cd0572 100644 --- a/log.c +++ b/log.c @@ -38,6 +38,8 @@ static void vMessage(uint32_t class, const char *message, va_list args) bp=strlen(buff); assert(bp < MESSAGE_BUFLEN); vsnprintf(buff+bp,MESSAGE_BUFLEN-bp,message,args); + buff[sizeof(buff)-2] = '\n'; + buff[sizeof(buff)-1] = '\0'; /* Each line is sent separately */ while ((nlp=strchr(buff,'\n'))) { *nlp=0;