disable pango markup by default. added --pango-markup option for explicit enablement.
[rrdtool.git] / src / rrd_thread_safe_nt.c
index 1633e23..899fe93 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * RRDtool 1.3rc3  Copyright by Tobi Oetiker, 1997-2008
+ * RRDtool 1.3rc7  Copyright by Tobi Oetiker, 1997-2008
  * This file:     Copyright 2003 Peter Stamfest <peter@stamfest.at> 
  *                             & Tobias Oetiker
  * Distributed under the GPL
@@ -70,8 +70,8 @@ const char *rrd_strerror(
     ctx = rrd_get_context();
 
     EnterCriticalSection(&CriticalSection);
-    strncpy(ctx->lib_errstr, strerror(err), ctx->errlen);
-    ctx->lib_errstr[ctx->errlen] = '\0';
+    strncpy(ctx->lib_errstr, strerror(err), sizeof(ctx->lib_errstr));
+    ctx->lib_errstr[sizeof(ctx->lib_errstr) - 1] = '\0';
     LeaveCriticalSection(&CriticalSection);
 
     return ctx->lib_errstr;