cataphract                               Fri, 17 Dec 2010 23:05:26 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=306416

Log:
- Fixed bug #53568 (swapped memset arguments in struct initialization).

Bug: http://bugs.php.net/53568 (Open) swapped memset arguments in 
ext/zip/lib/zip_dirent.c
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/zip/lib/zip_dirent.c
    U   php/php-src/trunk/ext/zip/lib/zip_dirent.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2010-12-17 21:21:06 UTC (rev 306415)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-12-17 23:05:26 UTC (rev 306416)
@@ -64,7 +64,11 @@
 - Streams:
   . Implemented FR #26158 (open arbitrary file descriptor with fopen). 
(Gustavo)

+- Zip extension
+  . Fixed bug #53568 (swapped memset arguments in struct initialization).
+    (crrodriguez at opensuse dot org)

+
 09 Dec 2010, PHP 5.3.4
 - Upgraded bundled Sqlite3 to version 3.7.3. (Ilia)
 - Upgraded bundled PCRE to version 8.10. (Ilia)

Modified: php/php-src/branches/PHP_5_3/ext/zip/lib/zip_dirent.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/zip/lib/zip_dirent.c       2010-12-17 
21:21:06 UTC (rev 306415)
+++ php/php-src/branches/PHP_5_3/ext/zip/lib/zip_dirent.c       2010-12-17 
23:05:26 UTC (rev 306416)
@@ -473,10 +473,8 @@
 static time_t
 _zip_d2u_time(int dtime, int ddate)
 {
-    struct tm tm;
+    struct tm tm = {0};

-    memset(&tm, sizeof(tm), 0);
-
     /* let mktime decide if DST is in effect */
     tm.tm_isdst = -1;


Modified: php/php-src/trunk/ext/zip/lib/zip_dirent.c
===================================================================
--- php/php-src/trunk/ext/zip/lib/zip_dirent.c  2010-12-17 21:21:06 UTC (rev 
306415)
+++ php/php-src/trunk/ext/zip/lib/zip_dirent.c  2010-12-17 23:05:26 UTC (rev 
306416)
@@ -473,10 +473,8 @@
 static time_t
 _zip_d2u_time(int dtime, int ddate)
 {
-    struct tm tm;
+    struct tm tm = {0};

-    memset(&tm, sizeof(tm), 0);
-
     /* let mktime decide if DST is in effect */
     tm.tm_isdst = -1;


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to