From 2ee7681013c9a557eb4e69f60686453b197c1a0c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 15 Aug 2012 13:12:50 +0200 Subject: [PATCH] -Werror,-Wstrncat-size (Clang towards 3.2) Change-Id: Ifdf0c47b38621835d6c6fa3a180d78f3f14edabf --- sal/osl/unx/signal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sal/osl/unx/signal.c b/sal/osl/unx/signal.c index f3a5f8a928ff..1f5c7591fa31 100644 --- a/sal/osl/unx/signal.c +++ b/sal/osl/unx/signal.c @@ -593,13 +593,13 @@ static int ReportCrash( int Signal ) int fdxml, fdstk, fdchksum; strncpy( szXMLTempNameBuffer, P_tmpdir, sizeof(szXMLTempNameBuffer) ); - strncat( szXMLTempNameBuffer, "/crxmlXXXXXX", sizeof(szXMLTempNameBuffer) ); + strncat( szXMLTempNameBuffer, "/crxmlXXXXXX", sizeof(szXMLTempNameBuffer) - strlen(szXMLTempNameBuffer) - 1 ); strncpy( szStackTempNameBuffer, P_tmpdir, sizeof(szStackTempNameBuffer) ); - strncat( szStackTempNameBuffer, "/crstkXXXXXX", sizeof(szStackTempNameBuffer) ); + strncat( szStackTempNameBuffer, "/crstkXXXXXX", sizeof(szStackTempNameBuffer) - strlen(szStackTempNameBuffer) - 1 ); strncpy( szChecksumTempNameBuffer, P_tmpdir, sizeof(szChecksumTempNameBuffer) ); - strncat( szChecksumTempNameBuffer, "/crchkXXXXXX", sizeof(szChecksumTempNameBuffer) ); + strncat( szChecksumTempNameBuffer, "/crchkXXXXXX", sizeof(szChecksumTempNameBuffer) - strlen(szChecksumTempNameBuffer) - 1 ); fdxml = mkstemp(szXMLTempNameBuffer); fdstk = mkstemp(szStackTempNameBuffer);