[patch] Fixed NULL dereference in selinux patch.
Tim Waugh
twaugh at fedoraproject.org
Fri Nov 25 18:08:01 UTC 2011
commit 13704094f00da9e3f64f1f2d3765fb16c6b53aa9
Author: Tim Waugh <twaugh at redhat.com>
Date: Fri Nov 25 18:07:08 2011 +0000
Fixed NULL dereference in selinux patch.
patch-selinux.patch | 2 +-
patch.spec | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/patch-selinux.patch b/patch-selinux.patch
index a7920b0..b9891c5 100644
--- a/patch-selinux.patch
+++ b/patch-selinux.patch
@@ -128,7 +128,7 @@ diff -up patch-2.6.1/src/pch.c.selinux patch-2.6.1/src/pch.c
validate_target_name (inname);
+ if (getfilecon (inname, &incontext) == -1)
+ if (errno == ENODATA || errno == ENOTSUP)
-+ *incontext = NULL;
++ incontext = NULL;
}
return retval;
diff --git a/patch.spec b/patch.spec
index 85582f6..44f6893 100644
--- a/patch.spec
+++ b/patch.spec
@@ -1,7 +1,7 @@
Summary: Utility for modifying/upgrading files
Name: patch
Version: 2.6.1
-Release: 10%{?dist}
+Release: 11%{?dist}
License: GPLv2+
URL: http://www.gnu.org/software/patch/patch.html
Group: Development/Tools
@@ -75,6 +75,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/*/*
%changelog
+* Fri Nov 25 2011 Tim Waugh <twaugh at redhat.com> 2.6.1-11
+- Fixed NULL dereference in selinux patch.
+
* Mon May 16 2011 Tim Waugh <twaugh at redhat.com> 2.6.1-10
- Applied Jiri Popelka's fixes from Coverity scan (bug #704554):
- Avoid unchecked return from getfilecon() in patch-selinux.patch.
More information about the scm-commits
mailing list