fix chrashing zipnote when edit .zip files (#1179420)
This commit is contained in:
		
							parent
							
								
									734c4f21a9
								
							
						
					
					
						commit
						99fef8bcfc
					
				
							
								
								
									
										7
									
								
								zip.spec
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								zip.spec
									
									
									
									
									
								
							| @ -1,7 +1,7 @@ | |||||||
| Summary: A file compression and packaging utility compatible with PKZIP | Summary: A file compression and packaging utility compatible with PKZIP | ||||||
| Name: zip | Name: zip | ||||||
| Version: 3.0 | Version: 3.0 | ||||||
| Release: 12%{?dist} | Release: 13%{?dist} | ||||||
| License: BSD | License: BSD | ||||||
| Group: Applications/Archiving | Group: Applications/Archiving | ||||||
| Source: http://downloads.sourceforge.net/infozip/zip30.tar.gz | Source: http://downloads.sourceforge.net/infozip/zip30.tar.gz | ||||||
| @ -16,6 +16,7 @@ Patch2: zip-3.0-currdir.patch | |||||||
| Patch3: zip-3.0-time.patch | Patch3: zip-3.0-time.patch | ||||||
| Patch4: man.patch | Patch4: man.patch | ||||||
| Patch5: zip-3.0-format-security.patch | Patch5: zip-3.0-format-security.patch | ||||||
|  | Patch6: zipnote.patch | ||||||
| BuildRequires: bzip2-devel | BuildRequires: bzip2-devel | ||||||
| 
 | 
 | ||||||
| %description | %description | ||||||
| @ -34,6 +35,7 @@ program. | |||||||
| %patch3 -p1 -b .time | %patch3 -p1 -b .time | ||||||
| %patch4 -p1 -b .man | %patch4 -p1 -b .man | ||||||
| %patch5 -p1 -b .format-security | %patch5 -p1 -b .format-security | ||||||
|  | %patch6 -p1 -b .zipnote | ||||||
| 
 | 
 | ||||||
| %build | %build | ||||||
| make -f unix/Makefile prefix=%{_prefix} "CFLAGS_NOOPT=-I. -DUNIX $RPM_OPT_FLAGS" generic_gcc  %{?_smp_mflags} | make -f unix/Makefile prefix=%{_prefix} "CFLAGS_NOOPT=-I. -DUNIX $RPM_OPT_FLAGS" generic_gcc  %{?_smp_mflags} | ||||||
| @ -58,6 +60,9 @@ make -f unix/Makefile prefix=$RPM_BUILD_ROOT%{_prefix} \ | |||||||
| %{_mandir}/man1/zipsplit.1* | %{_mandir}/man1/zipsplit.1* | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Wed Jan 28 2015 Petr Stodulka <pstodulk@redhat.com> - 3.0-13 | ||||||
|  | - fix crashing zipnote when editing .zip files (#1179420) | ||||||
|  | 
 | ||||||
| * Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-12 | * Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-12 | ||||||
| - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild | - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										13
									
								
								zipnote.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								zipnote.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,13 @@ | |||||||
|  | diff --git a/zipnote.c b/zipnote.c
 | ||||||
|  | index 5e02cb6..996f012 100644
 | ||||||
|  | --- a/zipnote.c
 | ||||||
|  | +++ b/zipnote.c
 | ||||||
|  | @@ -661,7 +661,7 @@ char **argv;            /* command line tokens */
 | ||||||
|  |      if ((r = zipcopy(z)) != ZE_OK) | ||||||
|  |        ziperr(r, "was copying an entry"); | ||||||
|  |    } | ||||||
|  | -  fclose(x);
 | ||||||
|  | +  fclose(in_file);
 | ||||||
|  |   | ||||||
|  |    /* Write central directory and end of central directory with new comments */ | ||||||
|  |    if ((c = zftello(y)) == (zoff_t)-1)    /* get start of central */ | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user