rpms/rdate/devel rdate-1.4-udp.patch,NONE,1.1 rdate.spec,1.21,1.22

Jiří Moskovčák (jmoskovc) fedora-extras-commits at redhat.com
Tue Jul 10 16:54:24 UTC 2007


Author: jmoskovc

Update of /cvs/extras/rpms/rdate/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30014

Modified Files:
	rdate.spec 
Added Files:
	rdate-1.4-udp.patch 
Log Message:
- fixes memory allocation
- Resolves: #190883



rdate-1.4-udp.patch:

--- NEW FILE rdate-1.4-udp.patch ---
diff -urp rdate-1.4/rdate.c rdate-1.4_mzk/rdate.c
--- rdate-1.4/rdate.c	2004-04-21 20:44:22.000000000 +0200
+++ rdate-1.4_mzk/rdate.c	2007-07-10 18:31:56.000000000 +0200
@@ -87,7 +87,7 @@ rdate(const char *hostname, time_t *retv
 #endif
   int fd;
   unsigned char time_buf[4];
-  int nr, n_toread;
+  int nr = 0, n_toread;
 
   assert(hostname);
   assert(retval);
@@ -266,7 +266,7 @@ int main(int argc, char *argv[])
 	    }
 	  break;
 	default:
-	  hosts = realloc(hosts, sizeof(char *) * nhosts+1);
+	  hosts = realloc(hosts, sizeof(char *) * (nhosts+1));
 	  hosts[nhosts++] = argv[i];
 	  break;
 	}


Index: rdate.spec
===================================================================
RCS file: /cvs/extras/rpms/rdate/devel/rdate.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- rdate.spec	29 May 2007 13:25:57 -0000	1.21
+++ rdate.spec	10 Jul 2007 16:53:49 -0000	1.22
@@ -1,10 +1,11 @@
 Summary: Tool for getting the date/time from a remote machine
 Name: rdate
 Version: 1.4
-Release: 7%{?dist}
+Release: 8%{?dist}
 License: GPL
 Group: Applications/System
 Source: ftp://people.redhat.com/sopwith/rdate-%{version}.tar.gz
+Patch0: rdate-1.4-udp.patch
 URL: ftp://people.redhat.com/sopwith/
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -16,6 +17,7 @@
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -DINET6"
@@ -35,6 +37,10 @@
 %{_mandir}/man1/rdate.1*
 
 %changelog
+* Tue Jul 10 2007 Jiri Moskovcak <jmoskovc at redhat.com> 1.4-8
+- fixes memory allocation
+- Resolves: #190883
+
 * Tue May 29 2007 Phil Knirsch <pknirsch at redhat.com> - 1.4-7
 - Ceanups related to package review. (#226357)
 




More information about the scm-commits mailing list