loolwsd/Util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit ee1e036aa9d3ed41a0d766935f1ca4a8c944173d Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Mon Apr 11 09:12:59 2016 +0200 Util: strcpy -> strncpy Change-Id: I03f50f4e5e7f404364fdf90197750bf7cd762c9c diff --git a/loolwsd/Util.cpp b/loolwsd/Util.cpp index c26e63b..c6fae82 100644 --- a/loolwsd/Util.cpp +++ b/loolwsd/Util.cpp @@ -148,7 +148,7 @@ namespace Log << std::setw(5) << std::setfill('0') << Poco::Process::id(); Source.id = oss.str(); assert (sizeof (LogPrefix) > strlen(oss.str().c_str()) + 1); - strcpy(LogPrefix, oss.str().c_str()); + strncpy(LogPrefix, oss.str().c_str(), sizeof(LogPrefix)); auto channel = (isatty(fileno(stdout)) || std::getenv("LOOL_LOGCOLOR") ? static_cast<Poco::Channel*>(new Poco::ColorConsoleChannel()) @@ -488,7 +488,7 @@ namespace Util << Poco::Process::id() << "\n"; std::string streamStr = stream.str(); assert (sizeof (FatalGdbString) > strlen(streamStr.c_str()) + 1); - strcpy(FatalGdbString, streamStr.c_str()); + strncpy(FatalGdbString, streamStr.c_str(), sizeof(FatalGdbString)); } int getChildStatus(const int code) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits