fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / libetonyek / ubsan.patch
blobb7da70904b6213b30c799c657249240d745d3501
1 --- src/lib/libetonyek_xml.cpp
2 +++ src/lib/libetonyek_xml.cpp
3 @@ -33,7 +33,7 @@
4 unsigned long bytesRead = 0;
5 const unsigned char *const bytes = input->read(len, bytesRead);
7 - std::memcpy(buffer, bytes, static_cast<int>(bytesRead));
8 + if (bytesRead != 0) std::memcpy(buffer, bytes, static_cast<int>(bytesRead));
9 return static_cast<int>(bytesRead);
11 catch (...)