summaryrefslogtreecommitdiff
path: root/source/d/gcc/fastjar-patches/1002-fastjar-0.97-filename0.patch
blob: 34a02a74f37c4b01d711e6562071d2d10c61ce3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2010-03-01  Richard Guenther  <rguenther@suse.de>

	* jartool.c (read_entries): Properly zero-terminate filename.

--- fastjar-0.97/jartool.c	6 Sep 2009 22:16:00 -0000	1.59
+++ fastjar-0.97/jartool.c	1 Mar 2010 15:38:43 -0000	1.60
@@ -790,6 +790,7 @@ int read_entries (int fd)
 		   progname, jarfile);
 	  return 1;
 	}
+      ze->filename[len] = '\0';
       len = UNPACK_UB4(header, CEN_EFLEN);
       len += UNPACK_UB4(header, CEN_COMLEN);
       if (lseek (fd, len, SEEK_CUR) == -1)