-fsanitize=nonnull-attribute in memcpy call

Change-Id: I4fc491906311781b9941c8f02d99d254542027ae
This commit is contained in:
Stephan Bergmann 2015-06-02 16:56:08 +02:00
parent c2d73acad3
commit 2bc0a80839

View File

@ -305,7 +305,11 @@ void RscWriteRc :: PutUTF8( char * pStr )
n++;
sal_uInt32 nOldLen = IncSize( n );
memcpy( GetPointer( nOldLen ), pStr, nStrLen );
char * p = GetPointer( nOldLen );
if (nStrLen != 0)
{
memcpy( p, pStr, nStrLen );
}
// 0 terminated
pMem[ nOldLen + nStrLen ] = '\0';
}