]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup from BIND 8
authorMark Andrews <marka@isc.org>
Sat, 10 Apr 2004 03:47:09 +0000 (03:47 +0000)
committerMark Andrews <marka@isc.org>
Sat, 10 Apr 2004 03:47:09 +0000 (03:47 +0000)
1657.   [bug]           gmtime_r() called incorrectly.

lib/bind/resolv/res_debug.c

index e18214f9b7435d6f64ae6ae8ef8294dd1ce3a180..cc67f1e3b1e40347154fef9df087d6dd57f5280d 100644 (file)
@@ -95,7 +95,7 @@
 
 #if defined(LIBC_SCCS) && !defined(lint)
 static const char sccsid[] = "@(#)res_debug.c  8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_debug.c,v 1.10 2004/03/18 02:58:01 marka Exp $";
+static const char rcsid[] = "$Id: res_debug.c,v 1.11 2004/04/10 03:47:09 marka Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 #include "port_before.h"
@@ -1099,9 +1099,10 @@ p_secstodate (u_long secs) {
        static char output[15];         /* YYYYMMDDHHMMSS and null */
        time_t clock = secs;
        struct tm *time;
-       
 #ifdef HAVE_TIME_R
-       gmtime_r(&clock, &time);
+       struct tm res;
+       
+       time = gmtime_r(&clock, &res);
 #else
        time = gmtime(&clock);
 #endif