Your message dated Wed, 16 May 2007 11:02:04 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#416538: fixed in lesstif2 1:0.95.0-1
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: lesstif2
Version: 1:0.94.4-2
Severity: important
Tags: patch

*** Please type your report below this line ***

Sorry for my english!


Bug reproduction with "plan" application and a malloc debugger :

 - edit a day ; select a text case, then a another and then a another => SEGV


Explication:

In lesstif2-0.94.4/lib/Xm-2.1/XmIm.c , there is a chained list of
XmICStuff objects that point on XIM objects. Many XmICStuff can point
on the same XIM. So the first allocated XmICStuff object store a
counter of XIM reference and others have a link (in "orig_xim"
attribute) on this XmICStuff object.

When XmICStuff object must be closed, the function XmImCloseXIM()
checks the XIM counter (possibly on the original XmICStuff by
following orig_xim) to know if it can free the XIM object. However it
always unlinks and frees the XmICStuff object.

If another XmICStuff had a "orig_xim" on the freed XmICStuff then,
when it'll be closed, it'll try to access the freed XmICStuff by its
"orig_xim" attribute and involve a SEGV.

It seems to me that the XIM counter should be in XIM object. But
nevertheless, I made patch (cf. attachement), that workarounds the
problem.


-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (900, 'testing'), (50, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17.3
Locale: LANG=C, LC_CTYPE=fr_FR.iso8859-1 (charmap=ISO-8859-1)

Versions of packages lesstif2 depends on:
ii  libc6                     2.3.6.ds1-13   GNU C Library: Shared libraries
ii  libice6                   1:1.0.1-2      X11 Inter-Client Exchange library
ii  libsm6                    1:1.0.1-3      X11 Session Management library
ii  libx11-6                  2:1.0.3-6      X11 client-side library
ii  libxext6                  1:1.0.1-2      X11 miscellaneous extension librar
ii  libxp6                    1:1.0.0.xsf1-1 X Printing Extension (Xprint) clie
ii  libxt6                    1:1.0.2-2      X11 toolkit intrinsics library

lesstif2 recommends no packages.

-- no debconf information

Sincerly,
-- 
Julien
        << Vous n'avez rien a dire... Parlons-en! >>
diff -ru lesstif2-0.94.4-old/lib/Xm-2.1/XmIm.c lesstif2-0.94.4/lib/Xm-2.1/XmIm.c
--- lesstif2-0.94.4-old/lib/Xm-2.1/XmIm.c	2004-10-20 21:32:11.000000000 +0200
+++ lesstif2-0.94.4/lib/Xm-2.1/XmIm.c	2007-03-28 14:39:27.000000000 +0200
@@ -133,7 +133,10 @@
 		p->next = q->next;
 	}
 
-	XtFree((char *)stuff);
+	/* if count!=0 then someone uses the stuff as orig_xim
+	   so unlink it but not free it */
+	if (!stuff->count)
+		XtFree((char *)stuff);
 }
 
 /*
@@ -1060,6 +1063,8 @@
 		   XCloseIM(stuff->xim);
 		DEBUGOUT(_LtDebug(__FILE__, w, "XCloseIM(%p)\n", stuff->xim));
 		stuff->orig_xim->xim = NULL;
+		/* stuff->orig_xim is now useless */
+		XtFree(stuff->orig_xim);
 	} else {
 		DEBUGOUT(_LtDebug(__FILE__, w, "XmImCloseXIM(%p), count -> %d\n",
 			stuff->xim, stuff->orig_xim->count));

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Source: lesstif2
Source-Version: 1:0.95.0-1

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

lesstif-bin_0.95.0-1_i386.deb
  to pool/main/l/lesstif2/lesstif-bin_0.95.0-1_i386.deb
lesstif-doc_0.95.0-1_all.deb
  to pool/main/l/lesstif2/lesstif-doc_0.95.0-1_all.deb
lesstif2-dev_0.95.0-1_i386.deb
  to pool/main/l/lesstif2/lesstif2-dev_0.95.0-1_i386.deb
lesstif2_0.95.0-1.diff.gz
  to pool/main/l/lesstif2/lesstif2_0.95.0-1.diff.gz
lesstif2_0.95.0-1.dsc
  to pool/main/l/lesstif2/lesstif2_0.95.0-1.dsc
lesstif2_0.95.0-1_i386.deb
  to pool/main/l/lesstif2/lesstif2_0.95.0-1_i386.deb
lesstif2_0.95.0.orig.tar.gz
  to pool/main/l/lesstif2/lesstif2_0.95.0.orig.tar.gz



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.
Sam Hocevar (Debian packages) <[EMAIL PROTECTED]> (supplier of updated lesstif2 
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: Wed, 16 May 2007 01:39:17 +0200
Source: lesstif2
Binary: lesstif-bin lesstif2 lesstif2-dev lesstif-doc
Architecture: source all i386
Version: 1:0.95.0-1
Distribution: unstable
Urgency: low
Maintainer: Sam Hocevar (Debian packages) <[EMAIL PROTECTED]>
Changed-By: Sam Hocevar (Debian packages) <[EMAIL PROTECTED]>
Description: 
 lesstif-bin - user binaries for LessTif
 lesstif-doc - documentation for LessTif
 lesstif2   - OSF/Motif 2.1 implementation released under LGPL
 lesstif2-dev - development library and header files for LessTif 2.1
Closes: 377100 377230 416538
Changes: 
 lesstif2 (1:0.95.0-1) unstable; urgency=low
 .
   * New upstream release.
 .
   * debian/control:
     + Added Vcs control fields.
     + Build-depend on debhelper (>= 5.0).
 .
   * debian/patches/010_rebootstrap.diff
     debian/patches/020_xpmpipethrough.diff:
     + Refreshed patches.
 .
   * debian/patches/020_upstream.diff:
     + Patch is included in this release. Removed it.
 .
   * debian/patches/021_xim_chained_list_crash.diff:
     + New patch. Fix for a crash in the XIM chained list, courtesy of Julien
       Soula (Closes: #416538).
 .
   * debian/patches/022_gcc42_compliant_headers.diff:
     + New patch. Make exported headers gcc-4.2 complian, courtesy of Martin
       Michlmayr (Closes: #377230, #377100).
Files: 
 8ed052b20ee1a9b5adafc9871a64d6b0 940 libs optional lesstif2_0.95.0-1.dsc
 9c9ff519bcaf5c2e013d7992fe5260cd 3516722 libs optional 
lesstif2_0.95.0.orig.tar.gz
 1947799cf3cd905ebc35bc7e8f6fc5ee 341661 libs optional lesstif2_0.95.0-1.diff.gz
 bcf64913a3e3090d8329418b1d1d58fb 360354 doc optional 
lesstif-doc_0.95.0-1_all.deb
 38e7949418466d202b3a5b99b167444f 616114 libs optional 
lesstif2_0.95.0-1_i386.deb
 1f2ae0c50816f4f4e0064c17dc8d761f 843900 libdevel optional 
lesstif2-dev_0.95.0-1_i386.deb
 c8ab374af82ff1f5316445bc96ddfed2 166510 x11 optional 
lesstif-bin_0.95.0-1_i386.deb

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

iD8DBQFGSuGefPP1rylJn2ERAomoAJ9I3pYRAOTfdzrRsNZEI4T8hM9mOACgjAbX
gdGezPEjbcDXHDKmRJyhyrM=
=CCvz
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to