rpms/cifs-utils/F-13 cifs-utils-4.3-check-for-NULL-pointer-before-calling-str.patch, NONE, 1.1 cifs-utils.spec, 1.5, 1.6
Jeff Layton
jlayton at fedoraproject.org
Sat Apr 17 10:37:53 UTC 2010
Author: jlayton
Update of /cvs/pkgs/rpms/cifs-utils/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv541
Modified Files:
cifs-utils.spec
Added Files:
cifs-utils-4.3-check-for-NULL-pointer-before-calling-str.patch
Log Message:
Fix segfault when address list is exhausted (BZ#583230)
cifs-utils-4.3-check-for-NULL-pointer-before-calling-str.patch:
mount.cifs.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- NEW FILE cifs-utils-4.3-check-for-NULL-pointer-before-calling-str.patch ---
>From 1876123958c3afd44becce0427755257ddf87db9 Mon Sep 17 00:00:00 2001
From: Jeff Layton <jlayton at samba.org>
Date: Wed, 14 Apr 2010 14:11:37 -0400
Subject: [PATCH] mount.cifs: check for NULL pointer before calling strchr()
mount.cifs calls strchr on currentaddress, which may be a NULL pointer.
Signed-off-by: Jeff Layton <jlayton at samba.org>
---
mount.cifs.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/mount.cifs.c b/mount.cifs.c
index acab8c8..f3aa464 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -1730,9 +1730,11 @@ mount_retry:
case ECONNREFUSED:
case EHOSTUNREACH:
currentaddress = nextaddress;
- nextaddress = strchr(currentaddress, ',');
- if (nextaddress)
- *nextaddress++ = '\0';
+ if (currentaddress) {
+ nextaddress = strchr(currentaddress, ',');
+ if (nextaddress)
+ *nextaddress++ = '\0';
+ }
goto mount_retry;
case ENODEV:
fprintf(stderr,
--
1.6.6.1
Index: cifs-utils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cifs-utils/F-13/cifs-utils.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- cifs-utils.spec 9 Apr 2010 14:31:47 -0000 1.5
+++ cifs-utils.spec 17 Apr 2010 10:37:53 -0000 1.6
@@ -3,7 +3,7 @@
Name: cifs-utils
Version: 4.3
-Release: 1%{pre_release}%{?dist}
+Release: 2%{pre_release}%{?dist}
Summary: Utilities for mounting and managing CIFS mounts
Group: System Environment/Daemons
@@ -16,6 +16,8 @@ Source0: ftp://ftp.samba.org/pub/
BuildRequires: libcap-ng-devel libtalloc-devel krb5-devel keyutils-libs-devel autoconf automake
Requires: keyutils
+Patch1: cifs-utils-4.3-check-for-NULL-pointer-before-calling-str.patch
+
%description
The SMB/CIFS protocol is a standard file sharing protocol widely deployed
on Microsoft Windows machines. This package contains tools for mounting
@@ -27,6 +29,8 @@ file system.
%prep
%setup -q -n %{name}-%{version}%{pre_release}
+%patch1 -p1
+
%build
%configure --prefix=/usr
make %{?_smp_mflags}
@@ -47,6 +51,9 @@ rm -rf %{buildroot}
%{_mandir}/man8/mount.cifs.8.gz
%changelog
+* Sat Apr 17 2010 Jeff Layton <jlayton at redhat.com> 4.3-2
+- fix segfault when address list is exhausted (BZ#583230)
+
* Fri Apr 09 2010 Jeff Layton <jlayton at redhat.com> 4.3-1
- update to 4.3
More information about the scm-commits
mailing list