1002-fastjar-0.97-filename0.patch 488 B

123456789101112131415
  1. 2010-03-01 Richard Guenther <rguenther@suse.de>
  2. * jartool.c (read_entries): Properly zero-terminate filename.
  3. --- fastjar-0.97/jartool.c 6 Sep 2009 22:16:00 -0000 1.59
  4. +++ fastjar-0.97/jartool.c 1 Mar 2010 15:38:43 -0000 1.60
  5. @@ -790,6 +790,7 @@ int read_entries (int fd)
  6. progname, jarfile);
  7. return 1;
  8. }
  9. + ze->filename[len] = '\0';
  10. len = UNPACK_UB4(header, CEN_EFLEN);
  11. len += UNPACK_UB4(header, CEN_COMLEN);
  12. if (lseek (fd, len, SEEK_CUR) == -1)