summaryrefslogtreecommitdiffhomepage
path: root/test/util/posix_error.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/util/posix_error.cc')
-rw-r--r--test/util/posix_error.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/util/posix_error.cc b/test/util/posix_error.cc
index deed0c05b..8522e4c81 100644
--- a/test/util/posix_error.cc
+++ b/test/util/posix_error.cc
@@ -50,7 +50,7 @@ std::string PosixError::ToString() const {
ret = absl::StrCat("PosixError(errno=", errno_, " ", res, ")");
#endif
- if (!msg_.empty()) {
+ if (strnlen(msg_, sizeof(msg_)) > 0) {
ret.append(" ");
ret.append(msg_);
}