summaryrefslogtreecommitdiff
path: root/basic/source/classes/image.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-05-27 10:58:19 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-05-27 15:24:46 +0200
commit49c88d8b232f008efc864204e43ff3609b6aa6f5 (patch)
tree45cb5d15c5022defc2ebdd95d29d93b43db8a552 /basic/source/classes/image.cxx
parentc28753350ccf7440fe198a04ce249998320dcfb0 (diff)
-fsanitize=nullability
Change-Id: I27336c512ed0b46b32344a05611e6ba17e45adef Reviewed-on: https://gerrit.libreoffice.org/73023 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'basic/source/classes/image.cxx')
-rw-r--r--basic/source/classes/image.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index f2e255b78a2d..843581dc30ba 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -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 ) );
}