]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
be careful with buffers
authorwessels <>
Thu, 20 Aug 1998 04:23:48 +0000 (04:23 +0000)
committerwessels <>
Thu, 20 Aug 1998 04:23:48 +0000 (04:23 +0000)
src/debug.cc

index 784abad6117b7293c5f259777f2c8c56817e286d..18849de730a943b2719446e74cc1c6f69747502d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: debug.cc,v 1.69 1998/08/05 07:12:27 wessels Exp $
+ * $Id: debug.cc,v 1.70 1998/08/19 22:23:48 wessels Exp $
  *
  * DEBUG: section 0     Debug Routines
  * AUTHOR: Harvest Derived
@@ -84,7 +84,7 @@ _db_print(va_alist)
     if (_db_level <= 1 && opt_syslog_enable) {
        tmpbuf[0] = '\0';
        vsnprintf(tmpbuf, BUFSIZ, format, args);
-       tmpbuf[1023] = '\0';
+       tmpbuf[BUFSIZ-1] = '\0';
        syslog(_db_level == 0 ? LOG_WARNING : LOG_NOTICE, "%s", tmpbuf);
     }
 #endif /* HAVE_SYSLOG */