ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/tar TarEntry.java
Date Sun, 21 Jan 2001 00:43:23 GMT
donaldp     01/01/20 16:43:23

  Modified:    src/main/org/apache/tools/tar TarEntry.java
  Log:
  TarEntry.java was validating the maximum length for filenames only in one
  place. The tar-task used another constructor. Simply copied the verification
  to the other constructor to do the check there also. Now throws a
  RuntimeException.
  
  Submitted By: "Nico Seessle" <Nico.Seessle@epost.de>
  
  Revision  Changes    Path
  1.3       +6 -0      jakarta-ant/src/main/org/apache/tools/tar/TarEntry.java
  
  Index: TarEntry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/tar/TarEntry.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TarEntry.java	2001/01/03 14:18:48	1.2
  +++ TarEntry.java	2001/01/21 00:43:22	1.3
  @@ -177,6 +177,12 @@
           this.groupName = new StringBuffer("");
           this.devMajor = 0;
           this.devMinor = 0;
  +
  +        if (this.name.length() > NAMELEN) {
  +            throw new RuntimeException("file name '" + this.name 
  +                                             + "' is too long ( > " 
  +                                             + NAMELEN + " bytes)");
  +        } 
       }   
           
       /** 
  
  
  

Mime
View raw message