Your message dated Tue, 24 Apr 2007 14:32:04 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#420348: fixed in xaw3d 1.5+E-15
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: xaw3dg
Version:  1.5+E-14

When 'xfig' version 3.2.5 is configured to use Xaw3d, the xfig program locks 
up in an infinite loop when the 'T' (for text) button is clicked after 
program startup.

The problem in a function used for layouts, Box.c:PreferredSize():line 354, in 
this code:

            unsigned int width = preferred_width;
            do { /* find some width big enough to stay within this height */
                width *= 2;
                if (width > constraint->width) width = constraint->width;
                DoLayout(w, width, 0, &preferred_width, &preferred_height, 
FALSE);
            } while (preferred_height > constraint->height &&
                     width < constraint->width);

The problem is that for the case "request_mode == CWHeight", the value 
of 'constraint->width has been set to 0xffff, and DoLayout() will always 
set 'preferred_height' to the same value.  The value assigned 
to 'preferred_height' will be the same as the earlier call to DoLayout() at 
line 344, so we know that "preferred_height > constraint->height".  The 
variable 'width' has type "unsigned short", so eventually, the 
multiplication "width *= 2" overflows, and the value of "width" will become 
zero.

This became a problem in the 3.2.5 version of xfig, when the calls:

                update_indpanel(0);     /* first remove ind buttons */
                XtUnmanageChild(ind_panel);

at about line 616 became unconditionally executed.  The Viewport 
widget 'ind_panel' no longer has any widgets to layout, and the height of the 
viewport's inner window is set to a size smaller than the Viewport widget.  I 
think that makes sense. 

But an optimization introduced by D. J. Hawkey Jr. in the "E" version changed 
the way clipping works in Viewport.c:ComputeLayout().  The conditional 
PREP_CHILD_TO_CLIP is not defined, and the variable 'intended.height' is 
assigned a value from the child (viewport inner window) height, rather than 
the clip_width value computer from the widget height.

It's not clear to me whether the changes to Viewport.c:ComputeLayout() are 
valid or not, but it is clear that the Box.c loop is wrong.  So I prefer to 
leave Mr. Hawkey's changes in place, and fix the Box.c code (which hasn't 
changed from the older X11 version (Release 1.5; 14 May, 1998)

A note to "[EMAIL PROTECTED]" bounced, and then I found this reference that 
indicates that unfortunately Mr. Hawkey passed away:

http://packages.debian.org/changelogs/pool/main/v/vtwm/vtwm_5.4.7-2.1/changelog

So I'm sending a patch to you, hoping that it can get included.  Here's a 
patch that will fix the problem:

*** Box.c~      1996-10-15 10:41:18.000000000 -0400
--- Box.c       2007-04-21 14:12:44.000000000 -0400
***************
*** 353,360 ****
        else {
            width = preferred_width;
            do { /* find some width big enough to stay within this height */
!               width *= 2;
!               if (width > constraint->width) width = constraint->width;
                DoLayout(w, width, 0, &preferred_width, &preferred_height, 
FALSE);
            } while (preferred_height > constraint->height &&
                     width < constraint->width);
--- 353,363 ----
        else {
            width = preferred_width;
            do { /* find some width big enough to stay within this height */
!               if (width > constraint->width/2) /* avoid short int overflow 
*/
!                   width = constraint->width;
!               else
!                   width *= 2;
! 
                DoLayout(w, width, 0, &preferred_width, &preferred_height, 
FALSE);
            } while (preferred_height > constraint->height &&
                     width < constraint->width);
*** Box.c~	1996-10-15 10:41:18.000000000 -0400
--- Box.c	2007-04-21 14:12:44.000000000 -0400
***************
*** 353,360 ****
  	else {
  	    width = preferred_width;
  	    do { /* find some width big enough to stay within this height */
! 		width *= 2;
! 		if (width > constraint->width) width = constraint->width;
  		DoLayout(w, width, 0, &preferred_width, &preferred_height, FALSE);
  	    } while (preferred_height > constraint->height &&
  		     width < constraint->width);
--- 353,363 ----
  	else {
  	    width = preferred_width;
  	    do { /* find some width big enough to stay within this height */
! 		if (width > constraint->width/2) /* avoid short int overflow */
! 		    width = constraint->width;
! 		else
! 		    width *= 2;
! 
  		DoLayout(w, width, 0, &preferred_width, &preferred_height, FALSE);
  	    } while (preferred_height > constraint->height &&
  		     width < constraint->width);

--- End Message ---
--- Begin Message ---
Source: xaw3d
Source-Version: 1.5+E-15

We believe that the bug you reported is fixed in the latest version of
xaw3d, which is due to be installed in the Debian FTP archive:

xaw3d_1.5+E-15.diff.gz
  to pool/main/x/xaw3d/xaw3d_1.5+E-15.diff.gz
xaw3d_1.5+E-15.dsc
  to pool/main/x/xaw3d/xaw3d_1.5+E-15.dsc
xaw3dg-dev_1.5+E-15_i386.deb
  to pool/main/x/xaw3d/xaw3dg-dev_1.5+E-15_i386.deb
xaw3dg_1.5+E-15_i386.deb
  to pool/main/x/xaw3d/xaw3dg_1.5+E-15_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Francesco Paolo Lovergine <[EMAIL PROTECTED]> (supplier of updated xaw3d 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 24 Apr 2007 15:24:24 +0200
Source: xaw3d
Binary: xaw3dg xaw3dg-dev
Architecture: source i386
Version: 1.5+E-15
Distribution: unstable
Urgency: low
Maintainer: Francesco Paolo Lovergine <[EMAIL PROTECTED]>
Changed-By: Francesco Paolo Lovergine <[EMAIL PROTECTED]>
Description: 
 xaw3dg     - Xaw3d widget set
 xaw3dg-dev - Xaw3d widget set development package
Closes: 420348
Changes: 
 xaw3d (1.5+E-15) unstable; urgency=low
 .
   * New patch: box.c.dpatch, to avoid an infinite loop due to short int 
overflow.
     Thanks Glenn Burkhard. (closes: #420348)
   * Policy bumped to 3.7.2 (no changes).
   * Debhelper level moved to 5 with a few changes in debian/rules.
Files: 
 650e0d696ac97a64f2224f92264ce8af 768 x11 optional xaw3d_1.5+E-15.dsc
 e72213202bed08c29f029a51c02ebfac 16489 x11 optional xaw3d_1.5+E-15.diff.gz
 f5f5acd9428cbec18a5285b7c9091232 157704 x11 optional xaw3dg_1.5+E-15_i386.deb
 1e059c0fae2f80bdb79c182a3687deda 220408 devel optional 
xaw3dg-dev_1.5+E-15_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGLhC+pFNRmenyx0cRApN1AKD6uBIvmafk3wdzRiYBdmgLqdbdoQCfXESa
Co84c5SdB1kWJxK6qree9Ug=
=KyAZ
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to