blob: ef70a4af6719b158440b711a0c4073f4243f0527 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
diff --git a/util/status.cc b/util/status.cc
index 319b0d9a4e..fadfa7d65d 100644
--- a/util/status.cc
+++ b/util/status.cc
@@ -25,7 +25,7 @@ const char* Status::CopyState(const char* state) {
ret = strncpy_s(result, cch, state, cch - 1);
assert(ret == 0);
#else
- std::strncpy(result, state, cch - 1);
+ std::strncpy(result, state, cch);
#endif
return result;
}
|