[Libreoffice-commits] core.git: 2 commits - external/libetonyek external/python3
Stephan Bergmann
sbergman at redhat.com
Tue Jun 2 08:50:44 PDT 2015
external/libetonyek/ubsan.patch | 11 +++++++++++
external/python3/ubsan.patch.0 | 11 +++++++++++
2 files changed, 22 insertions(+)
New commits:
commit 1c989f8eff440fc47588b77cc73969a8c789a5ae
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jun 2 17:50:17 2015 +0200
external/python3: -fsanitize=nonnull-attribute
Change-Id: Ib589b638a81bfb77fd74da8b15ae7b11cfd2b58b
diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0
index 020f4bf..32a079e 100644
--- a/external/python3/ubsan.patch.0
+++ b/external/python3/ubsan.patch.0
@@ -20,6 +20,17 @@
/* Set the carry bit iff the function uses any sse registers.
This is clc or stc, together with the first byte of the jmp. */
+--- Objects/bytearrayobject.c
++++ Objects/bytearrayobject.c
+@@ -294,7 +294,7 @@
+ PyBuffer_Release(&vo);
+ return NULL;
+ }
+- memcpy(self->ob_bytes + mysize, vo.buf, vo.len);
++ if (vo.len != 0) memcpy(self->ob_bytes + mysize, vo.buf, vo.len);
+ PyBuffer_Release(&vo);
+ Py_INCREF(self);
+ return (PyObject *)self;
--- Objects/listobject.c
+++ Objects/listobject.c
@@ -641,7 +641,7 @@
commit c710b435f1443b5a5d8a0679943bc8a71755d866
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jun 2 17:49:48 2015 +0200
external/libetonyek: -fsanitize=nonnull-attribute
Change-Id: Ib7e6722d772a135325ebd1e33ed7b17f214fea47
diff --git a/external/libetonyek/ubsan.patch b/external/libetonyek/ubsan.patch
index f0ab147..3b5e64e 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 (...)
More information about the Libreoffice-commits
mailing list