Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / external / pdfium / ubsan.patch
blob4349e860bd37458b404d15eabf070cc10ad7ffe6
1 --- core/fxge/ge/cfx_facecache.cpp
2 +++ core/fxge/ge/cfx_facecache.cpp
3 @@ -206,7 +206,8 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(const CFX_Font* pFont,
6 } else {
7 - memset(pDestBuf, 0, dest_pitch * bmheight);
8 + if (dest_pitch != 0 && bmheight != 0)
9 + memset(pDestBuf, 0, dest_pitch * bmheight);
10 if (anti_alias == FXFT_RENDER_MODE_MONO &&
11 FXFT_Get_Bitmap_PixelMode(FXFT_Get_Glyph_Bitmap(m_Face)) ==
12 FXFT_PIXEL_MODE_MONO) {
13 --- third_party/agg23/agg_rasterizer_scanline_aa.h
14 +++ third_party/agg23/agg_rasterizer_scanline_aa.h
15 @@ -349,14 +349,14 @@
16 cover += cur_cell->cover;
18 if(area) {
19 - alpha = calculate_alpha((cover << (poly_base_shift + 1)) - area, no_smooth);
20 + alpha = calculate_alpha(int(unsigned(cover) << (poly_base_shift + 1)) - area, no_smooth);
21 if(alpha) {
22 sl.add_cell(x, alpha);
24 x++;
26 if(num_cells && cur_cell->x > x) {
27 - alpha = calculate_alpha(cover << (poly_base_shift + 1), no_smooth);
28 + alpha = calculate_alpha(unsigned(cover) << (poly_base_shift + 1), no_smooth);
29 if(alpha) {
30 sl.add_span(x, cur_cell->x - x, alpha);