]> gcc.gnu.org Git - gcc.git/commitdiff
jatool.c (extract_jar): Account for null termination when determining whether to...
authorBryce McKinlay <bryce@waitaki.otago.ac.nz>
Fri, 12 Oct 2001 00:49:42 +0000 (00:49 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Fri, 12 Oct 2001 00:49:42 +0000 (01:49 +0100)
        * jatool.c (extract_jar): Account for null termination when
determining whether to expand "filename".

From-SVN: r46220

fastjar/ChangeLog
fastjar/jartool.c

index 0a6fcd8822ba9cecbb162b191e99d5bad775f5e3..918454a57dabe4807056b0c2a967e9eb97509681 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
+
+       * jatool.c (extract_jar): Account for null termination when determining
+       whether to expand "filename".
+
 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
 
        * jartool.c (add_to_jar): Return 1 if `stat' initialy failed.
index 150ffdc33dbabdbc74ff43c83f8e9bb068f2806d..d4d15e9dae3bc6c5da5b08c4ef94165fb6b17fc5 100644 (file)
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
 
-/* $Id: jartool.c,v 1.7 2001/08/27 23:09:37 tromey Exp $
+/* $Id: jartool.c,v 1.8 2001/08/29 01:35:31 apbianco Exp $
 
    $Log: jartool.c,v $
+   Revision 1.8  2001/08/29 01:35:31  apbianco
+   2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
+
+       * jartool.c (add_to_jar): Return 1 if `stat' initialy failed.
+       Fixes PR java/3949.
+
+   (http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01641.html)
+
    Revision 1.7  2001/08/27 23:09:37  tromey
        * jartool.c (jarfile): Remove length limitation.
        (main): Use jt_strdup when initializing jarfile.
@@ -1302,7 +1310,7 @@ int extract_jar(int fd, char **files, int file_num){
 #endif
     }
 
-    if(filename_len < fnlen){
+    if(filename_len < fnlen + 1){
       if(filename != NULL)
         free(filename);
       
This page took 0.060846 seconds and 5 git commands to generate.