rpms/flow-tools/FC-3 flow-tools-0.68b.patch, NONE, 1.1 flow-tools.spec, 1.2, 1.3

Paul P Komkoff Jr (stingray) fedora-extras-commits at redhat.com
Mon Oct 31 21:11:40 UTC 2005


Author: stingray

Update of /cvs/extras/rpms/flow-tools/FC-3
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15164/FC-3

Modified Files:
	flow-tools.spec 
Added Files:
	flow-tools-0.68b.patch 
Log Message:
Fix flow-capture segfaults on platforms with 64bit time_t


flow-tools-0.68b.patch:

--- NEW FILE flow-tools-0.68b.patch ---
diff -urN flow-tools-0.68/lib/ftfile.c flow-tools-0.68.a/lib/ftfile.c
--- flow-tools-0.68/lib/ftfile.c	2003-02-13 05:38:42.000000000 +0300
+++ flow-tools-0.68.a/lib/ftfile.c	2005-10-30 00:27:33.000000000 +0400
@@ -413,16 +413,17 @@
  int done, u_int32 ftime)
 {
   struct tm *tm;
+  time_t _t = (time_t) ftime;
   char *prefix, dbuf[64];
   long gmt_val;
   char gmt_sign;
   int tm_gmtoff;
   
-  if (!(tm = localtime ((time_t*)&ftime))) {
+  if (!(tm = localtime (&_t))) {
     snprintf(buf, bsize, ".");
   }
 
-  tm_gmtoff = get_gmtoff(ftime);
+  tm_gmtoff = get_gmtoff(_t);
 
   /* compute GMT offset */
   if (tm_gmtoff >= 0) {
@@ -502,6 +503,7 @@
 int ftfile_mkpath(u_int32 ftime, int nest)
 {
   struct tm *tm;
+  time_t _t = (time_t) ftime;
   char buf[32];
 
   /* no directories */
@@ -512,7 +514,7 @@
   if ((nest > 3) || (nest < -3))
     return -1;
 
-  if (!(tm = localtime ((time_t*)&ftime)))
+  if (!(tm = localtime (&_t)))
     return -1;
 
   if (nest == -1)


Index: flow-tools.spec
===================================================================
RCS file: /cvs/extras/rpms/flow-tools/FC-3/flow-tools.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- flow-tools.spec	20 Oct 2005 13:22:14 -0000	1.2
+++ flow-tools.spec	31 Oct 2005 21:11:37 -0000	1.3
@@ -1,12 +1,13 @@
 Version: 0.68
 Name: flow-tools
 Summary: Tool set for working with NetFlow data
-Release: 4%{?dist}
+Release: 5%{?dist}
 Group: Applications/System
 License: BSD 
 URL: http://www.splintered.net/sw/flow-tools/
 Source0: ftp://ftp.eng.oar.net/pub/flow-tools/flow-tools-%{version}.tar.gz
 Patch0: flow-tools-0.68a.patch
+Patch1: flow-tools-0.68b.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: openssl-devel mysql-devel postgresql-devel autoconf zlib-devel
 
@@ -39,6 +40,7 @@
 %prep
 %setup -q
 %patch -p1
+%patch1 -p1
 
 %build
 autoreconf -f -i -s
@@ -77,6 +79,9 @@
 %{_includedir}/*.h
 
 %changelog
+* Sun Oct 30 2005 Paul P Komkoff Jr <i at stingr.net> 0.68-5
+- Fix flow-capture segfaults on platforms with 64bit time_t
+
 * Thu Oct 20 2005 Paul P Komkoff Jr <i at stingr.net> 0.68-4
 - Fix accidential damage
 




More information about the fedora-extras-commits mailing list