diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-06-02 17:49:48 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-06-02 17:49:48 +0200 |
commit | c710b435f1443b5a5d8a0679943bc8a71755d866 (patch) | |
tree | 37853ca21457cb91ee1db690fb0628f4bc22df01 /external/libetonyek | |
parent | c8346d77e73bdbe82a1eb73dd83c34ada8c68b17 (diff) |
external/libetonyek: -fsanitize=nonnull-attribute
Change-Id: Ib7e6722d772a135325ebd1e33ed7b17f214fea47
Diffstat (limited to 'external/libetonyek')
-rw-r--r-- | external/libetonyek/ubsan.patch | 11 |
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 (...) |