Mageia Bugzilla – Attachment 11428 Details for
Bug 25737
pidgin with purple facebook gets stuck consuming 100% of cpu
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Attempted fix for pango
pango-mga25737-fix-attempt--integer-underflow--v0.1.0.patch (text/plain), 680 bytes, created by
Shlomi Fish
on 2019-12-23 10:56:53 CET
(
hide
)
Description:
Attempted fix for pango
Filename:
MIME Type:
Creator:
Shlomi Fish
Created:
2019-12-23 10:56:53 CET
Size:
680 bytes
patch
obsolete
>diff --git a/pango/pangocairo-render.c b/pango/pangocairo-render.c >index e268ebd5..f196fee2 100644 >--- a/pango/pangocairo-render.c >+++ b/pango/pangocairo-render.c >@@ -828,11 +828,16 @@ draw_error_underline (cairo_t *cr, > double square = height / HEIGHT_SQUARES; > double unit_width = (HEIGHT_SQUARES - 1) * square; > double double_width = 2 * unit_width; >- int width_units = (width + unit_width / 2) / unit_width; >+ const int width_units = (width + unit_width / 2) / unit_width; > double y_top, y_bottom; > double x_left, x_middle, x_right; > int i; > >+ if (width_units < 2) >+ { >+ return; >+ } >+ > x += (width - width_units * unit_width) / 2; > > y_top = y;
diff --git a/pango/pangocairo-render.c b/pango/pangocairo-render.c index e268ebd5..f196fee2 100644 --- a/pango/pangocairo-render.c +++ b/pango/pangocairo-render.c @@ -828,11 +828,16 @@ draw_error_underline (cairo_t *cr, double square = height / HEIGHT_SQUARES; double unit_width = (HEIGHT_SQUARES - 1) * square; double double_width = 2 * unit_width; - int width_units = (width + unit_width / 2) / unit_width; + const int width_units = (width + unit_width / 2) / unit_width; double y_top, y_bottom; double x_left, x_middle, x_right; int i; + if (width_units < 2) + { + return; + } + x += (width - width_units * unit_width) / 2; y_top = y;
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 25737
: 11428