-fsanitize=nonnull-attribute in memcpy call
Change-Id: I4fc491906311781b9941c8f02d99d254542027ae
This commit is contained in:
@@ -305,7 +305,11 @@ void RscWriteRc :: PutUTF8( char * pStr )
|
|||||||
n++;
|
n++;
|
||||||
|
|
||||||
sal_uInt32 nOldLen = IncSize( n );
|
sal_uInt32 nOldLen = IncSize( n );
|
||||||
memcpy( GetPointer( nOldLen ), pStr, nStrLen );
|
char * p = GetPointer( nOldLen );
|
||||||
|
if (nStrLen != 0)
|
||||||
|
{
|
||||||
|
memcpy( p, pStr, nStrLen );
|
||||||
|
}
|
||||||
// 0 terminated
|
// 0 terminated
|
||||||
pMem[ nOldLen + nStrLen ] = '\0';
|
pMem[ nOldLen + nStrLen ] = '\0';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user