projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
add missing \0 to the end of several strncpy strings
[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
8f68ea3
..
105507f
100644
(file)
--- a/
src/rrd_thread_safe_nt.c
+++ b/
src/rrd_thread_safe_nt.c
@@
-63,7
+63,8
@@
const char *rrd_strerror(int err) {
EnterCriticalSection(&CriticalSection);
strncpy(ctx->lib_errstr, strerror(err), ctx->errlen);
- LeaveCriticalSection(&CriticalSection);
+ ctx->lib_errstr[ctx->errlen] = '\0';
+ LeaveCriticalSection(&CriticalSection);
return ctx->lib_errstr;
}