Your message dated Sun, 17 Apr 2011 22:03:11 +0000
with message-id <e1qba3j-0004su...@franck.debian.org>
and subject line Bug#613367: fixed in jclassinfo 0.19.1-6
has caused the Debian Bug report #613367,
regarding jclassinfo: memory usage problems
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 this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
613367: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=613367
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: jclassinfo
Version: 0.19.1-5
Severity: important
Tags: upstream patch

Parsing some classes results with a crash:

(...)
81)CONSTANT_Utf8[1]("too many bytes in \"")
*** glibc detected *** /tmp/jclassinfo-0.19.1/jclassinfo/.libs/lt-jclassinfo: 
free(): invalid next size (fast): 0x08cf5c08 ***
======= Backtrace: =========
/lib/i686/cmov/libc.so.6(+0x6b281)[0xb75bb281]
/lib/i686/cmov/libc.so.6(+0x6cad8)[0xb75bcad8]
/lib/i686/cmov/libc.so.6(cfree+0x6d)[0xb75bfbbd]
/tmp/jclassinfo-0.19.1/jclassinfo/.libs/lt-jclassinfo[0x804bf07]
/tmp/jclassinfo-0.19.1/jclassinfo/.libs/lt-jclassinfo[0x804bc41]
/tmp/jclassinfo-0.19.1/jclassinfo/.libs/lt-jclassinfo[0x804c34c]
/tmp/jclassinfo-0.19.1/jclassinfo/.libs/lt-jclassinfo[0x804d8bc]
/lib/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0xb7566c76]
/tmp/jclassinfo-0.19.1/jclassinfo/.libs/lt-jclassinfo[0x8049a01]
======= Memory map: ========
08048000-08050000 r-xp 00000000 08:05 2313111    
/tmp/jclassinfo-0.19.1/jclassinfo/.libs/lt-jclassinfo
08050000-08051000 rw-p 00008000 08:05 2313111    
/tmp/jclassinfo-0.19.1/jclassinfo/.libs/lt-jclassinfo
08cf4000-08d15000 rw-p 00000000 00:00 0          [heap]
b7400000-b7421000 rw-p 00000000 00:00 0 
b7421000-b7500000 ---p 00000000 00:00 0 
b7517000-b7534000 r-xp 00000000 08:05 1157360    /lib/libgcc_s.so.1
b7534000-b7535000 rw-p 0001c000 08:05 1157360    /lib/libgcc_s.so.1
b754f000-b7550000 rw-p 00000000 00:00 0 
b7550000-b7690000 r-xp 00000000 08:05 1610228    /lib/i686/cmov/libc-2.11.2.so
b7690000-b7692000 r--p 0013f000 08:05 1610228    /lib/i686/cmov/libc-2.11.2.so
b7692000-b7693000 rw-p 00141000 08:05 1610228    /lib/i686/cmov/libc-2.11.2.so
b7693000-b7696000 rw-p 00000000 00:00 0 
b7696000-b76ba000 r-xp 00000000 08:05 1610150    /lib/i686/cmov/libm-2.11.2.so
b76ba000-b76bb000 r--p 00023000 08:05 1610150    /lib/i686/cmov/libm-2.11.2.so
b76bb000-b76bc000 rw-p 00024000 08:05 1610150    /lib/i686/cmov/libPrzerwane


I just increased the size of the char* new_string in jclass/jstring.c by 20 
bytes when mallocing; not correct, but works for me.
Additionally fixed some minor memory problems.

To debug, use "valgrind" after "exec" in jclassinfo/jclassinfo:
      exec valgrind $progdir/$program ${1+"$@"}


-- System Information:
Debian Release: 6.0
  APT prefers testing
  APT policy: (650, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)

Versions of packages jclassinfo depends on:
ii  libc6                   2.11.2-10        Embedded GNU C Library: Shared lib
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

jclassinfo recommends no packages.

jclassinfo suggests no packages.
diff -r -u jclass_orig//class_loader.c jclass/class_loader.c
--- jclass_orig//class_loader.c	2011-02-14 10:40:01.000000000 +0100
+++ jclass/class_loader.c	2011-02-14 10:47:00.000000000 +0100
@@ -222,6 +222,7 @@
 		}
 	}
 
+	free(class_filename);
 	return absolute_class_filename;
 }
 
diff -r -u jclass_orig//jstring.c jclass/jstring.c
--- jclass_orig//jstring.c	2011-02-14 10:40:01.000000000 +0100
+++ jclass/jstring.c	2011-02-14 11:45:12.000000000 +0100
@@ -118,7 +118,7 @@
 		str_ptr++;
 	}
 
-	new_string = (char*) malloc(string_length + 1);
+	new_string = (char*) malloc(string_length + 1 /* ugly fix: */ + 20);
 
 	str_ptr = raw_string;
 	to_ptr = new_string;
@@ -199,8 +199,9 @@
 		number = strdup("0");
 	else
 	{
-		number = (char*) malloc(40);
-		number[40] = '\0';
+		int max_size = 41;
+		number = (char*) malloc(max_size);
+		number[max_size - 1] = '\0';
 
 		/* set sign */
 		if (float_bytes & 0x80000000)
@@ -247,8 +248,9 @@
 		number = strdup("0");
 	else
 	{
-		number = (char*) malloc(80);
-		number[40] = '\0';
+		int max_size = 81;
+		number = (char*) malloc(max_size);
+		number[max_size - 1] = '\0';
 
 		/* set sign */
 		if ((double_bytes >> 63))

--- End Message ---
--- Begin Message ---
Source: jclassinfo
Source-Version: 0.19.1-6

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

jclassinfo_0.19.1-6.debian.tar.gz
  to main/j/jclassinfo/jclassinfo_0.19.1-6.debian.tar.gz
jclassinfo_0.19.1-6.dsc
  to main/j/jclassinfo/jclassinfo_0.19.1-6.dsc
jclassinfo_0.19.1-6_amd64.deb
  to main/j/jclassinfo/jclassinfo_0.19.1-6_amd64.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 613...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Vincent Fourmond <fourm...@debian.org> (supplier of updated jclassinfo 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 ftpmas...@debian.org)


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

Format: 1.8
Date: Sun, 17 Apr 2011 23:18:23 +0200
Source: jclassinfo
Binary: jclassinfo
Architecture: source amd64
Version: 0.19.1-6
Distribution: unstable
Urgency: low
Maintainer: Debian Java Maintainers 
<pkg-java-maintainers@lists.alioth.debian.org>
Changed-By: Vincent Fourmond <fourm...@debian.org>
Description: 
 jclassinfo - extracts information from Java class files
Closes: 613367 623158
Changes: 
 jclassinfo (0.19.1-6) unstable; urgency=low
 .
   * Switch to dh 7 and its wonderful sequencer
   * Bump compatibility level accordingly
   * Now conforms to standards 3.9.2
   * Switch to format 3.0 (quilt)
   * Drop dependencies on dpatch
   * Drop README.source
   * Now recognizing newer JVMs (closes: #623158)
   * Find the flaw in the computations of the string size (closes: #613367)
Checksums-Sha1: 
 a3daed4433b66cb3853165e4e78635a878ff350d 1339 jclassinfo_0.19.1-6.dsc
 1a640b524fba03294903db36bfa4c01b335f0f50 6518 jclassinfo_0.19.1-6.debian.tar.gz
 aeca1926035b1ea25f7ce46996e511cd73c52462 73528 jclassinfo_0.19.1-6_amd64.deb
Checksums-Sha256: 
 b2180f74a9a624637873303bd847eacfa92d5a4f08e51531048a8b71cf09bbe8 1339 
jclassinfo_0.19.1-6.dsc
 7b051d7cbdb5c10998c1d61c976fbd782668ddd347c22cdb9823ee4bfae29c61 6518 
jclassinfo_0.19.1-6.debian.tar.gz
 7b6da8964db4b5c4eb39c5d6d5293d5915032710038e573e958437dc92678359 73528 
jclassinfo_0.19.1-6_amd64.deb
Files: 
 a3dd3a5baad5228b67bed9f7f0d3abe9 1339 java optional jclassinfo_0.19.1-6.dsc
 055f1f82e9fa5961b89e5eaf2e411b20 6518 java optional 
jclassinfo_0.19.1-6.debian.tar.gz
 64d351c56d3d9c4dbc493b71c4204a9a 73528 java optional 
jclassinfo_0.19.1-6_amd64.deb

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

iEYEARECAAYFAk2rYgIACgkQx/UhwSKygsrvXgCfQ2eIKCXPGzOZ9+QuUSwQ6TT8
FjAAoIK8bYFOLZMSI8UccKdYeX5QxUIX
=7eQV
-----END PGP SIGNATURE-----



--- End Message ---
__
This is the maintainer address of Debian's Java team
<http://lists.alioth.debian.org/mailman/listinfo/pkg-java-maintainers>. Please 
use
debian-j...@lists.debian.org for discussions and questions.

Reply via email to