projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
disable pango markup by default. added --pango-markup option for explicit enablement.
[rrdtool.git]
/
src
/
rrd_thread_safe_nt.c
diff --git
a/src/rrd_thread_safe_nt.c
b/src/rrd_thread_safe_nt.c
index
dba1c3e
..
899fe93
100644
(file)
--- a/
src/rrd_thread_safe_nt.c
+++ b/
src/rrd_thread_safe_nt.c
@@
-70,8
+70,8
@@
const char *rrd_strerror(
ctx = rrd_get_context();
EnterCriticalSection(&CriticalSection);
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;
LeaveCriticalSection(&CriticalSection);
return ctx->lib_errstr;