svn commit: r378405 - in head/x11-wm/fluxbox: . files

Kurt Jaeger pi at FreeBSD.org
Wed Feb 4 15:54:28 UTC 2015


Author: pi
Date: Wed Feb  4 15:54:27 2015
New Revision: 378405
URL: https://svnweb.freebsd.org/changeset/ports/378405
QAT: https://qat.redports.org/buildarchive/r378405/

Log:
  x11-wm/fluxbox: fix integer underflow in startup phase
  
  See also
  http://git.fluxbox.org/fluxbox.git/commit/?id=7b8fd2d81ad80a73564fc9fbb779f47568f12652
  
  PR:		197150
  Submitted by:	vikashb at where-ever.za.net
  Approved by:	portmgr runtime fix blanket

Added:
  head/x11-wm/fluxbox/files/patch-src__FbTk__TextButton.cc   (contents, props changed)
Modified:
  head/x11-wm/fluxbox/Makefile

Modified: head/x11-wm/fluxbox/Makefile
==============================================================================
--- head/x11-wm/fluxbox/Makefile	Wed Feb  4 14:54:37 2015	(r378404)
+++ head/x11-wm/fluxbox/Makefile	Wed Feb  4 15:54:27 2015	(r378405)
@@ -3,6 +3,7 @@
 
 PORTNAME=	fluxbox
 PORTVERSION=	1.3.6
+PORTREVISION=	1
 CATEGORIES=	x11-wm
 MASTER_SITES=	SF
 DISTFILES=	${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}

Added: head/x11-wm/fluxbox/files/patch-src__FbTk__TextButton.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-wm/fluxbox/files/patch-src__FbTk__TextButton.cc	Wed Feb  4 15:54:27 2015	(r378405)
@@ -0,0 +1,21 @@
+--- src/FbTk/TextButton.cc	2015-01-28 11:12:27.000000000 +0200
++++ src/FbTk/TextButton.cc	2015-01-28 11:14:03.000000000 +0200
+@@ -143,11 +143,17 @@
+     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


More information about the svn-ports-all mailing list