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

lib/bind/resolv/res_debug.c

index 8dea1e4c7afb0e8e3a817288153aceee697f304b..69ca59dfe260df430d4d8e7c39acb8277455059f 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.3.2.7 2004/03/16 12:35:34 marka Exp $";
+static const char rcsid[] = "$Id: res_debug.c,v 1.3.2.8 2004/04/10 03:41:33 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