pdfium now has a build_config.h which is something between a generated file (it's not part of git) and a normal header (works in a way, so the same header works for all platforms), handle it the same way as clucene. Change-Id: I674eca0c52fb8681c3a20501e39f95a8f9d8724e Reviewed-on: https://gerrit.libreoffice.org/50840 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
44 lines
1.8 KiB
Diff
44 lines
1.8 KiB
Diff
--- core/fxcrt/string_data_template.h
|
|
+++ core/fxcrt/string_data_template.h
|
|
@@ -78,7 +78,8 @@
|
|
|
|
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;
|
|
}
|
|
|
|
--- core/fxge/cfx_facecache.cpp
|
|
+++ core/fxge/cfx_facecache.cpp
|
|
@@ -183,7 +183,8 @@ std::unique_ptr<CFX_GlyphBitmap> CFX_FaceCache::RenderGlyph(
|
|
}
|
|
}
|
|
} else {
|
|
- memset(pDestBuf, 0, dest_pitch * bmheight);
|
|
+ if (dest_pitch != 0 && bmheight != 0)
|
|
+ memset(pDestBuf, 0, dest_pitch * bmheight);
|
|
int rowbytes = std::min(abs(src_pitch), dest_pitch);
|
|
for (int row = 0; row < bmheight; row++)
|
|
memcpy(pDestBuf + row * dest_pitch, pSrcBuf + row * src_pitch, rowbytes);
|
|
--- third_party/agg23/agg_rasterizer_scanline_aa.h
|
|
+++ third_party/agg23/agg_rasterizer_scanline_aa.h
|
|
@@ -349,14 +349,14 @@ public:
|
|
cover += cur_cell->cover;
|
|
}
|
|
if(area) {
|
|
- alpha = calculate_alpha((cover << (poly_base_shift + 1)) - area, no_smooth);
|
|
+ alpha = calculate_alpha(int(unsigned(cover) << (poly_base_shift + 1)) - area, no_smooth);
|
|
if(alpha) {
|
|
sl.add_cell(x, alpha);
|
|
}
|
|
x++;
|
|
}
|
|
if(num_cells && cur_cell->x > x) {
|
|
- alpha = calculate_alpha(cover << (poly_base_shift + 1), no_smooth);
|
|
+ alpha = calculate_alpha(unsigned(cover) << (poly_base_shift + 1), no_smooth);
|
|
if(alpha) {
|
|
sl.add_span(x, cur_cell->x - x, alpha);
|
|
}
|