summaryrefslogtreecommitdiff
path: root/external/pdfium/ubsan.patch
diff options
context:
space:
mode:
Diffstat (limited to 'external/pdfium/ubsan.patch')
-rw-r--r--external/pdfium/ubsan.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/external/pdfium/ubsan.patch b/external/pdfium/ubsan.patch
index 91428326fc5d..9939b6e9e4b6 100644
--- a/external/pdfium/ubsan.patch
+++ b/external/pdfium/ubsan.patch
@@ -1,9 +1,9 @@
--- core/fxcrt/string_data_template.h
+++ core/fxcrt/string_data_template.h
-@@ -78,7 +78,8 @@
+@@ -76,7 +76,8 @@ class StringDataTemplate {
+ ASSERT(nLen >= 0);
+ ASSERT(offset + nLen <= m_nAllocLength);
- void CopyContentsAt(size_t offset, const CharType* pStr, size_t nLen) {
- ASSERT(offset >= 0 && nLen >= 0 && offset + nLen <= m_nAllocLength);
- memcpy(m_String + offset, pStr, nLen * sizeof(CharType));
+ if (nLen != 0)
+ memcpy(m_String + offset, pStr, nLen * sizeof(CharType));