1 --- core/fxcrt/string_data_template.h
2 +++ core/fxcrt/string_data_template.h
3 @@ -76,7 +76,8 @@ class StringDataTemplate {
5 ASSERT(offset + nLen <= m_nAllocLength);
7 - memcpy(m_String + offset, pStr, nLen * sizeof(CharType));
9 + memcpy(m_String + offset, pStr, nLen * sizeof(CharType));
10 m_String[offset + nLen] = 0;
13 --- core/fxge/cfx_glyphcache.cpp
14 +++ core/fxge/cfx_glyphcache.cpp
15 @@ -183,7 +183,8 @@ std::unique_ptr<CFX_GlyphBitmap> CFX_GlyphCache::RenderGlyph(
19 - memset(pDestBuf, 0, dest_pitch * bmheight);
20 + if (dest_pitch != 0 && bmheight != 0)
21 + memset(pDestBuf, 0, dest_pitch * bmheight);
22 int rowbytes = std::min(abs(src_pitch), dest_pitch);
23 for (int row = 0; row < bmheight; row++)
24 memcpy(pDestBuf + row * dest_pitch, pSrcBuf + row * src_pitch, rowbytes);