diff options
Diffstat (limited to 'external/pdfium/ubsan.patch')
-rw-r--r-- | external/pdfium/ubsan.patch | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/external/pdfium/ubsan.patch b/external/pdfium/ubsan.patch index 1d03c28a4d15..8610e24f2828 100644 --- a/external/pdfium/ubsan.patch +++ b/external/pdfium/ubsan.patch @@ -1,14 +1,14 @@ ---- core/fxcrt/string_data_template.h -+++ core/fxcrt/string_data_template.h -@@ -76,7 +76,8 @@ class StringDataTemplate { - ASSERT(nLen >= 0); - ASSERT(offset + nLen <= m_nAllocLength); +--- core/fxcrt/string_data_template.cpp ++++ core/fxcrt/string_data_template.cpp +@@ -82,7 +82,8 @@ void StringDataTemplate<CharType>::CopyContentsAt(size_t offset, + ASSERT(nLen >= 0); + ASSERT(offset + nLen <= m_nAllocLength); -- memcpy(m_String + offset, pStr, nLen * sizeof(CharType)); -+ if (nLen != 0) -+ memcpy(m_String + offset, pStr, nLen * sizeof(CharType)); - m_String[offset + nLen] = 0; - } +- memcpy(m_String + offset, pStr, nLen * sizeof(CharType)); ++ if (nLen != 0) ++ memcpy(m_String + offset, pStr, nLen * sizeof(CharType)); + m_String[offset + nLen] = 0; + } --- core/fxge/cfx_glyphcache.cpp +++ core/fxge/cfx_glyphcache.cpp |