cvs: /php4 reentrancy.c

From: Date: Mon, 24 Apr 2000 16:17:15 +0000
Subject: cvs: /php4 reentrancy.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-13976@lists.php.net to get a copy of this message
zeev Mon Apr 24 09:17:15 2000 EDT Modified files: /php4 reentrancy.c Log: - Fix crash bug in localtime_r. If locatime() returns NULL then also return NULL Index: php4/reentrancy.c diff -u php4/reentrancy.c:1.11 php4/reentrancy.c:1.12 --- php4/reentrancy.c:1.11 Fri Mar 3 08:10:38 2000 +++ php4/reentrancy.c Mon Apr 24 09:16:45 2000 @@ -91,11 +91,14 @@ local_lock(LOCALTIME_R); tmp = localtime(timep); - memcpy(p_tm, tmp, sizeof(struct tm)); + if (tmp) { + memcpy(p_tm, tmp, sizeof(struct tm)); + tmp = p_tm; + } local_unlock(LOCALTIME_R); - return p_tm; + return tmp; } #endif

« previous php.version4 (#13976) next »