rpms/cpio/F-11 cpio-2.10-patternnamesigsegv.patch, NONE, 1.1 cpio.spec, 1.66, 1.67
Ondrej Vasik
ovasik at fedoraproject.org
Thu Feb 25 09:15:07 UTC 2010
Author: ovasik
Update of /cvs/pkgs/rpms/cpio/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv24120
Modified Files:
cpio.spec
Added Files:
cpio-2.10-patternnamesigsegv.patch
Log Message:
fix segfault with nonexisting file with patternnames(#567022), do process install-info only without --excludedocs(#515924)
cpio-2.10-patternnamesigsegv.patch:
copyin.c | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
--- NEW FILE cpio-2.10-patternnamesigsegv.patch ---
diff -urNp cpio-2.10-orig/src/copyin.c cpio-2.10/src/copyin.c
--- cpio-2.10-orig/src/copyin.c 2010-02-22 12:57:59.000000000 +0100
+++ cpio-2.10/src/copyin.c 2010-02-22 12:55:26.000000000 +0100
@@ -944,20 +944,23 @@ read_pattern_file ()
pattern_fp = fopen (pattern_file_name, "r");
if (pattern_fp == NULL)
open_error (pattern_file_name);
- while (ds_fgetstr (pattern_fp, &pattern_name, '\n') != NULL)
- {
- if (new_num_patterns >= max_new_patterns)
- {
- max_new_patterns += 1;
- new_save_patterns = (char **)
- xrealloc ((char *) new_save_patterns,
- max_new_patterns * sizeof (char *));
- }
- new_save_patterns[new_num_patterns] = xstrdup (pattern_name.ds_string);
- ++new_num_patterns;
- }
- if (ferror (pattern_fp) || fclose (pattern_fp) == EOF)
- close_error (pattern_file_name);
+ else
+ {
+ while (ds_fgetstr (pattern_fp, &pattern_name, '\n') != NULL)
+ {
+ if (new_num_patterns >= max_new_patterns)
+ {
+ max_new_patterns += 1;
+ new_save_patterns = (char **)
+ xrealloc ((char *) new_save_patterns,
+ max_new_patterns * sizeof (char *));
+ }
+ new_save_patterns[new_num_patterns] = xstrdup (pattern_name.ds_string);
+ ++new_num_patterns;
+ }
+ if (ferror (pattern_fp) || fclose (pattern_fp) == EOF)
+ close_error (pattern_file_name);
+ }
for (i = 0; i < num_patterns; ++i)
new_save_patterns[i] = save_patterns[i];
Index: cpio.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cpio/F-11/cpio.spec,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -p -r1.66 -r1.67
--- cpio.spec 1 Dec 2009 11:41:49 -0000 1.66
+++ cpio.spec 25 Feb 2010 09:15:07 -0000 1.67
@@ -3,7 +3,7 @@
Summary: A GNU archiving program
Name: cpio
Version: 2.9.90
-Release: 6%{?dist}
+Release: 7%{?dist}
License: GPLv3+
Group: Applications/Archiving
URL: http://www.gnu.org/software/cpio/
@@ -19,6 +19,7 @@ Patch6: cpio-2.9-dev_number.patch
Patch7: cpio-2.9-sys_umask.patch
Patch8: cpio-2.9.90-defaultremoteshell.patch
Patch9: cpio-fortifysources.patch
+Patch10: cpio-2.10-patternnamesigsegv.patch
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
BuildRequires: texinfo, autoconf, gettext, rmt
@@ -49,6 +50,7 @@ Install cpio if you need a program to ma
%patch7 -p1 -b .sys_umask
%patch8 -p1 -b .defaultremote
%patch9 -p1 -b .fortify
+%patch10 -p1 -b .patternsegv
autoheader
@@ -74,11 +76,15 @@ install -c -p -m 0644 %{SOURCE1} ${RPM_B
rm -rf ${RPM_BUILD_ROOT}
%post
-/sbin/install-info %{_infodir}/cpio.info.gz %{_infodir}/dir || :
+if [ $1 = 0 ]; then
+ /sbin/install-info %{_infodir}/cpio.info.gz %{_infodir}/dir || :
+fi
%preun
if [ $1 = 0 ]; then
- /sbin/install-info --delete %{_infodir}/cpio.info.gz %{_infodir}/dir || :
+ if [ -f %{_infodir}/cpio.info.gz ]; then
+ /sbin/install-info --delete %{_infodir}/cpio.info.gz %{_infodir}/dir || :
+ fi
fi
%files -f %{name}.lang
@@ -89,6 +95,11 @@ fi
%{_infodir}/*.info*
%changelog
+* Thu Feb 25 2010 Ondrej Vasik <ovasik at redhat.com> 2.9.90-7
+- fix segfault with nonexisting file with patternnames
+ (#567022)
+- do process install-info only without --excludedocs(#515924)
+
* Tue Dec 1 2009 Ondrej Vasik <ovasik at redhat.com> 2.9.90-6
- fix buffer overflow detection by fortify sources (#542389)
More information about the scm-commits
mailing list