linville pushed to unzoo (f21). "Replace strcpy/strcat with strncpy/strncat to avoid some buffer overflows (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Mon Mar 30 22:11:12 UTC 2015


>From b8f32833e11d0f26ff117ffea61b0503add806c5 Mon Sep 17 00:00:00 2001
From: "John W. Linville" <linville at tuxdriver.com>
Date: Mon, 30 Mar 2015 14:58:59 -0400
Subject: Replace strcpy/strcat with strncpy/strncat to avoid some buffer
 overflows

- Check for backward-pointing directory entries to avoid endless looping
- Fix _most_ of the compiler warnings

diff --git a/unzoo.spec b/unzoo.spec
index a80f4ca..35e8222 100644
--- a/unzoo.spec
+++ b/unzoo.spec
@@ -1,6 +1,6 @@
 Name:           unzoo
 Version:        4.4
-Release:        12%{?dist}
+Release:        13%{?dist}
 Summary:        ZOO archive extractor
 
 Group:          Applications/Archiving
@@ -9,6 +9,11 @@ URL:            http://archives.math.utk.edu/software/multi-platform/gap/util/un
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Source0:        http://archives.math.utk.edu/software/multi-platform/gap/util/unzoo.c
 
+Patch0:         unzoo-convert-strcpy_strcat-to-strncpy_strncat.patch
+Patch1:         unzoo-directory-points-backward.patch
+Patch2:         unzoo-warning-fixes.patch
+
+
 %description
 'unzoo' is a zoo archive extractor.  A zoo archive is a file that
 contains several files, called its members, usually in compressed form
@@ -23,6 +28,10 @@ need the zoo archiver, called 'zoo', written by Rahul Dhesi.
 cp -a %{SOURCE0} .
 cat %{SOURCE0} | sed -e '/SYNTAX/,/\*\//!d' | cut -c5- > unzoo.txt
 
+%patch0 -p1 -b .strncpy
+%patch1 -p1 -b .revdir
+%patch2 -p1 -b .warnings
+
 
 %build
 gcc %{optflags} -o unzoo -DSYS_IS_UNIX unzoo.c
@@ -46,6 +55,11 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Mon Mar 30 2015 John W. Linville <linville at redhat.com> - 4.4-13
+- Replace strcpy/strcat with strncpy/strncat to avoid some buffer overflows
+- Check for backward-pointing directory entries to avoid endless looping
+- Fix _most_ of the compiler warnings
+
 * Mon Aug 18 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4.4-12
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/unzoo.git/commit/?h=f21&id=b8f32833e11d0f26ff117ffea61b0503add806c5


More information about the scm-commits mailing list