]> granicus.if.org Git - fcron/commitdiff
bug corrected : a too long message used not to be truncated correctly, and the string...
authorthib <thib>
Sat, 21 Apr 2001 08:42:33 +0000 (08:42 +0000)
committerthib <thib>
Sat, 21 Apr 2001 08:42:33 +0000 (08:42 +0000)
log.c

diff --git a/log.c b/log.c
index 88679e9a32b92abfe8e9ea693aa100f5c9a9996a..00195ee62df1eba0f69d2266f62ff0dd72e09e92 100644 (file)
--- a/log.c
+++ b/log.c
@@ -22,7 +22,7 @@
  *  `LICENSE' that comes with the fcron source distribution.
  */
 
- /* $Id: log.c,v 1.5 2001-02-14 13:52:09 thib Exp $ */
+ /* $Id: log.c,v 1.6 2001-04-21 08:42:33 thib Exp $ */
 
 /* This code is inspired by Anacron's sources of
    Itai Tzur <itzur@actcom.co.il> ( thanks to him ) */
@@ -67,7 +67,7 @@ make_msg(char *fmt, va_list args)
      * returns when the buffer overflows.  Hmmm... */
     len = vsnprintf(msg, MAX_MSG + 1, fmt, args);
     if (len >= MAX_MSG)
-       strcpy(msg + sizeof(msg) - sizeof(truncated), truncated);
+       strcpy(msg + (MAX_MSG + 1) - sizeof(truncated), truncated);
 
     return msg;
 }