diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-06-02 16:56:13 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-06-02 16:56:13 +0200 |
commit | eee25979d16e2a53f31311774812cb5866d020bc (patch) | |
tree | 6f7139da86b8f272c789725d3005b2a4e5863487 /sal/osl/unx | |
parent | 2bc0a808392cff87342bf9377c4066169c7150e7 (diff) |
-fsanitize=nonnull-attribute in memcpy call
Change-Id: Ic2fc0752f2bce2d565ca58b1c804bfd601b80875
Diffstat (limited to 'sal/osl/unx')
-rw-r--r-- | sal/osl/unx/file.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx index 73612a32d273..aa918c8d6565 100644 --- a/sal/osl/unx/file.cxx +++ b/sal/osl/unx/file.cxx @@ -678,7 +678,7 @@ oslFileError FileHandle_Impl::writeSequence_Impl ( /* resize sequence */ rtl_byte_sequence_realloc(ppSequence, nElements); } - if (*ppSequence != 0) + if (*ppSequence != 0 && nBytes != 0) { /* fill sequence */ memcpy(&((*ppSequence)->elements[*pnOffset]), pBuffer, nBytes), *pnOffset += nBytes; |