Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / external / libetonyek / ubsan.patch
blob260e9f33df58caf7fad6b0f8be53704250c56730
1 --- src/lib/libetonyek_xml.cpp
2 +++ src/lib/libetonyek_xml.cpp
3 @@ -35,7 +35,7 @@
4 unsigned long bytesRead = 0;
5 const unsigned char *const bytes = input->read((unsigned long)len, bytesRead);
7 - std::memcpy(buffer, bytes, static_cast<size_t>(bytesRead));
8 + if (bytesRead != 0) std::memcpy(buffer, bytes, static_cast<size_t>(bytesRead));
9 return static_cast<int>(bytesRead);
11 catch (...)