rpms/ftp/devel netkit-ftp-0.17-chkmalloc.patch, NONE, 1.1 ftp.spec, 1.47, 1.48

Jiri Skala jskala at fedoraproject.org
Mon Dec 1 12:35:52 UTC 2008


Author: jskala

Update of /cvs/extras/rpms/ftp/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16724

Modified Files:
	ftp.spec 
Added Files:
	netkit-ftp-0.17-chkmalloc.patch 
Log Message:
* Mon Dec 01 2008 Jiri Skala <jskala at redhat.com> - 0.17-49
- Resolves: #473491  unchecked malloc


netkit-ftp-0.17-chkmalloc.patch:

--- NEW FILE netkit-ftp-0.17-chkmalloc.patch ---
diff -up netkit-ftp-0.17/ftp/ruserpass.c.chkmalloc netkit-ftp-0.17/ftp/ruserpass.c
--- netkit-ftp-0.17/ftp/ruserpass.c.chkmalloc	2008-12-01 11:54:15.000000000 +0100
+++ netkit-ftp-0.17/ftp/ruserpass.c	2008-12-01 11:56:06.000000000 +0100
@@ -137,7 +137,8 @@ next:
 			if (token()) {
 				if (*aname == 0) { 
 					*aname = malloc((unsigned) strlen(tokval) + 1);
-					(void) strcpy(*aname, tokval);
+					if (*aname != NULL)
+						(void) strcpy(*aname, tokval);
 				} else {
 					if (strcmp(*aname, tokval))
 						goto next;
@@ -158,7 +159,8 @@ next:
 			}
 			if (token() && *apass == 0) {
 				*apass = malloc((unsigned) strlen(tokval) + 1);
-				(void) strcpy(*apass, tokval);
+				if (*apass != NULL)
+					(void) strcpy(*apass, tokval);
 			}
 			break;
 		case ACCOUNT:
@@ -170,7 +172,8 @@ next:
 			}
 			if (token() && *aacct == 0) {
 				*aacct = malloc((unsigned) strlen(tokval) + 1);
-				(void) strcpy(*aacct, tokval);
+				if (*aacct != NULL)
+					(void) strcpy(*aacct, tokval);
 			}
 			break;
 		case MACDEF:


Index: ftp.spec
===================================================================
RCS file: /cvs/extras/rpms/ftp/devel/ftp.spec,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- ftp.spec	23 Apr 2008 14:41:47 -0000	1.47
+++ ftp.spec	1 Dec 2008 12:35:22 -0000	1.48
@@ -1,7 +1,7 @@
 Summary: The standard UNIX FTP (File Transfer Protocol) client
 Name: ftp
 Version: 0.17
-Release: 48%{?dist}
+Release: 49%{?dist}
 License: BSD with advertising
 Group: Applications/Internet
 Source0: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/netkit-ftp-%{version}.tar.gz
@@ -30,6 +30,7 @@
 Patch22: netkit-ftp-0.17-bitrate.patch
 Patch23: netkit-ftp-0.17-arg_max.patch
 Patch24: netkit-ftp-0.17-case.patch
+Patch25: netkit-ftp-0.17-chkmalloc.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: glibc-devel, readline-devel, ncurses-devel
@@ -68,6 +69,7 @@
 %patch22 -p1 -b .bitrate
 %patch23 -p1 -b .arg_max
 %patch24 -p1 -b .case
+%patch25 -p1 -b .chkmalloc
 
 %build
 sh configure --with-c-compiler=gcc --enable-ipv6
@@ -101,6 +103,9 @@
 %{_mandir}/man5/netrc.*
 
 %changelog
+* Mon Dec 01 2008 Jiri Skala <jskala at redhat.com> - 0.17-49
+- Resolves: #473491  unchecked malloc
+
 * Wed Apr 23 2008 Martin Nagy <mnagy at redhat.com> - 0.17-48
 - fix mget when using case
 - Resolves: #442712




More information about the fedora-extras-commits mailing list