cvs: php4 /main reentrancy.c

From: Date: Tue, 13 Mar 2001 11:09:37 +0000
Subject: cvs: php4 /main reentrancy.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-4528@lists.php.net to get a copy of this message
dbeu Tue Mar 13 03:09:37 2001 EDT Modified files: /php4/main reentrancy.c Log: fix bug in php_gmtime_r Index: php4/main/reentrancy.c diff -u php4/main/reentrancy.c:1.25 php4/main/reentrancy.c:1.26 --- php4/main/reentrancy.c:1.25 Sun Feb 25 22:07:31 2001 +++ php4/main/reentrancy.c Tue Mar 13 03:09:37 2001 @@ -205,11 +205,14 @@ local_lock(GMTIME_R); tmp = gmtime(timep); - memcpy(p_tm, tmp, sizeof(struct tm)); + if (tmp) { + memcpy(p_tm, tmp, sizeof(struct tm)); + tmp = p_tm; + } local_unlock(GMTIME_R); - return p_tm; + return tmp; } #endif

« previous php.cvs (#4528) next »