diff options
Diffstat (limited to 'external/pdfium/ubsan.patch')
-rw-r--r-- | external/pdfium/ubsan.patch | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/external/pdfium/ubsan.patch b/external/pdfium/ubsan.patch index 91428326fc5d..8610e24f2828 100644 --- a/external/pdfium/ubsan.patch +++ b/external/pdfium/ubsan.patch @@ -1,18 +1,18 @@ ---- core/fxcrt/string_data_template.h -+++ core/fxcrt/string_data_template.h -@@ -78,7 +78,8 @@ +--- 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); - 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)); - 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_facecache.cpp -+++ core/fxge/cfx_facecache.cpp -@@ -183,7 +183,8 @@ std::unique_ptr<CFX_GlyphBitmap> CFX_FaceCache::RenderGlyph( +--- core/fxge/cfx_glyphcache.cpp ++++ core/fxge/cfx_glyphcache.cpp +@@ -183,7 +183,8 @@ std::unique_ptr<CFX_GlyphBitmap> CFX_GlyphCache::RenderGlyph( } } } else { |