basic/source/classes/image.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 49c88d8b232f008efc864204e43ff3609b6aa6f5 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Mon May 27 10:58:19 2019 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Mon May 27 15:24:46 2019 +0200 -fsanitize=nullability Change-Id: I27336c512ed0b46b32344a05611e6ba17e45adef Reviewed-on: https://gerrit.libreoffice.org/73023 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> 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 ) ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits