summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-02 17:49:48 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-02 17:49:48 +0200
commitc710b435f1443b5a5d8a0679943bc8a71755d866 (patch)
tree37853ca21457cb91ee1db690fb0628f4bc22df01 /external
parentc8346d77e73bdbe82a1eb73dd83c34ada8c68b17 (diff)
external/libetonyek: -fsanitize=nonnull-attribute
Change-Id: Ib7e6722d772a135325ebd1e33ed7b17f214fea47
Diffstat (limited to 'external')
-rw-r--r--external/libetonyek/ubsan.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/external/libetonyek/ubsan.patch b/external/libetonyek/ubsan.patch
index f0ab1475a5fb..3b5e64ec7046 100644
--- a/external/libetonyek/ubsan.patch
+++ b/external/libetonyek/ubsan.patch
@@ -9,3 +9,14 @@
if (m_value)
{
+--- src/lib/libetonyek_xml.cpp
++++ src/lib/libetonyek_xml.cpp
+@@ -33,7 +33,7 @@
+ unsigned long bytesRead = 0;
+ const unsigned char *const bytes = input->read(len, bytesRead);
+
+- std::memcpy(buffer, bytes, static_cast<int>(bytesRead));
++ if (bytesRead != 0) std::memcpy(buffer, bytes, static_cast<int>(bytesRead));
+ return static_cast<int>(bytesRead);
+ }
+ catch (...)