index 8f68ea395b853a047ba2b1fd2fd6133c6646abca..105507f2747160f052f1d7f357d6d487018c1ded 100644 (file)
--- a/src/rrd_thread_safe_nt.c
+++ b/src/rrd_thread_safe_nt.c
EnterCriticalSection(&CriticalSection);
strncpy(ctx->lib_errstr, strerror(err), ctx->errlen);
- LeaveCriticalSection(&CriticalSection);
+ ctx->lib_errstr[ctx->errlen] = '\0';
+ LeaveCriticalSection(&CriticalSection);
return ctx->lib_errstr;
}