Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 405196 Details for
Bug 552222
x11-wm/fluxbox-1.3.6-r1 can abort with several built in styles
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for FLuxbox bug 1116
fluxbox-1.3.6-bug-1116.patch (text/plain), 1.71 KB, created by
Tom Dexter
on 2015-06-15 18:30:50 UTC
(
hide
)
Description:
Patch for FLuxbox bug 1116
Filename:
MIME Type:
Creator:
Tom Dexter
Created:
2015-06-15 18:30:50 UTC
Size:
1.71 KB
patch
obsolete
>From 7b8fd2d81ad80a73564fc9fbb779f47568f12652 Mon Sep 17 00:00:00 2001 >From: Mathias Gumz <akira@fluxbox.org> >Date: Sat, 10 Jan 2015 22:44:37 +0100 >Subject: Fix bug: integer underflow in startup phase > >When fluxbox comes up some of it's drawables span a 1x1 area. Subtracting from >such small numbers bigger ones always lead to massive problems when 'unsigned >int' are involved: > >'button_width' is an unsigned int of '1' (this might be caused by another >issue or on purpose, anyway), subtracting -10 or any other number should >result in something < 0 when in reality an integer underflow happen: max_width >is now MAX_INT-something big. This makes fluxbox crash under certain >circumstances. > >This fixes bug #1116. > >diff --git a/src/FbTk/TextButton.cc b/src/FbTk/TextButton.cc >index 611580c..a177f25 100644 >--- a/src/FbTk/TextButton.cc >+++ b/src/FbTk/TextButton.cc >@@ -143,11 +143,17 @@ void TextButton::drawText(int x_offset, int y_offset, FbDrawable *drawable) { > unsigned int textlen = visual.size(); > unsigned int button_width = width(); > unsigned int button_height = height(); >+ const int max_width = static_cast<int>(button_width) - x_offset - >+ m_left_padding - m_right_padding; >+ >+ if (max_width <= bevel()) { >+ return; >+ } > > translateSize(m_orientation, button_width, button_height); > > // horizontal alignment, cut off text if needed >- int align_x = FbTk::doAlignment(button_width - x_offset - m_left_padding - m_right_padding, >+ int align_x = FbTk::doAlignment(max_width, > bevel(), justify(), font(), > visual.data(), visual.size(), > textlen); // return new text len >-- >cgit v0.10 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 552222
: 405196