Kaydet (Commit) eee25979 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

-fsanitize=nonnull-attribute in memcpy call

Change-Id: Ic2fc0752f2bce2d565ca58b1c804bfd601b80875
üst 2bc0a808
...@@ -678,7 +678,7 @@ oslFileError FileHandle_Impl::writeSequence_Impl ( ...@@ -678,7 +678,7 @@ oslFileError FileHandle_Impl::writeSequence_Impl (
/* resize sequence */ /* resize sequence */
rtl_byte_sequence_realloc(ppSequence, nElements); rtl_byte_sequence_realloc(ppSequence, nElements);
} }
if (*ppSequence != 0) if (*ppSequence != 0 && nBytes != 0)
{ {
/* fill sequence */ /* fill sequence */
memcpy(&((*ppSequence)->elements[*pnOffset]), pBuffer, nBytes), *pnOffset += nBytes; memcpy(&((*ppSequence)->elements[*pnOffset]), pBuffer, nBytes), *pnOffset += nBytes;
......
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