[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#113236: Fastjar extracts some file names incorrectly



Thanks. Here is a patch, I'm checking it in.

regards

Bryce.

2001-10-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>

   * jatool.c (extract_jar): Account for null termination when determining
   whether to expand "filename".

Index: jartool.c
===================================================================
RCS file: /cvs/gcc/gcc/fastjar/jartool.c,v
retrieving revision 1.8
diff -u -r1.8 jartool.c
--- jartool.c   2001/08/29 01:35:31     1.8
+++ jartool.c   2001/10/12 00:41:23
@@ -1310,7 +1310,7 @@
#endif
    }

-    if(filename_len < fnlen){
+    if(filename_len < fnlen + 1){
      if(filename != NULL)
        free(filename);

Matthias Klose wrote:

[Reported on the Debian BTS; I didn't check against the HEAD branch]


------------------------------------------------------------------------

Subject:

Bug#113236: Fastjar extracts some file names incorrectly
From:

John Leuner <jewel@pixie.co.za>
Date:

Sun, 23 Sep 2001 14:54:41 +0100
To:

submit@bugs.debian.org


Package: fastjar
Version: 1:3.0.1-0pre010811

I tried to extract the jar file at http://jemacs.sourceforge.net/jemacs.jar.

I extracted it with fastjar xf <filename>, and it created some files with strange names.

Ie:

gnu/mapping/BindingEnumeration.class^A^Y
gnu/bytecode/ConstantValueAttr.class^A^Y

The jar util that came with the IBM JDK 1.3 extracted these files correctly.

John Leuner







Reply to: