-fsanitize=nullability

Change-Id: I27336c512ed0b46b32344a05611e6ba17e45adef
Reviewed-on: https://gerrit.libreoffice.org/73023
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann
2019-05-27 10:58:19 +02:00
parent c28753350c
commit 49c88d8b23

View File

@@ -534,7 +534,9 @@ void SbiImage::MakeStrings( short nSize )
nStringSize = 1024;
pStrings.reset( new sal_Unicode[ nStringSize ]);
mvStringOffsets.resize(nSize);
memset( mvStringOffsets.data(), 0, nSize * sizeof( sal_uInt32 ) );
if (nSize != 0) {
memset( mvStringOffsets.data(), 0, nSize * sizeof( sal_uInt32 ) );
}
memset( pStrings.get(), 0, nStringSize * sizeof( sal_Unicode ) );
}