Kaydet (Commit) 6b1d3559 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1241080 Dereference after null check

Change-Id: I82113fcd4182f9557ba0e7258498b5d4e798bf03
üst 5e0b8b79
......@@ -1768,9 +1768,8 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newTrim )( IMPL_RTL_STRINGDATA** ppThis,
{
nLen -= nPostSpaces+nPreSpaces;
*ppThis = IMPL_RTL_STRINGNAME( ImplAlloc )( nLen );
OSL_ASSERT(*ppThis != NULL);
if ( *ppThis )
rtl_str_ImplCopy( (*ppThis)->buffer, pStr->buffer+nPreSpaces, nLen );
assert(*ppThis);
rtl_str_ImplCopy( (*ppThis)->buffer, pStr->buffer+nPreSpaces, nLen );
}
RTL_LOG_STRING_NEW( *ppThis );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment