swapped memset arguments in ext/zip/lib/zip_dirent.c

Bug #53568 swapped memset arguments in ext/zip/lib/zip_dirent.c
Submitted: 2010-12-17 23:42 UTC Modified: 2010-12-18 00:05 UTC
From: crrodriguez at opensuse dot org Assigned: cataphract (profile)
Status: Closed Package: Zip Related
PHP Version: 5.3SVN-2010-12-17 (SVN) OS: all
Private report: No CVE-ID: None

 [2010-12-17 23:42 UTC] crrodriguez at opensuse dot org

Description:
------------
Swapped arguments in usage of memset

Test script:
---------------
--------

Expected result:
----------------
Index: ext/zip/lib/zip_dirent.c
===================================================================
--- ext/zip/lib/zip_dirent.c    (revisión: 306414)
+++ ext/zip/lib/zip_dirent.c    (copia de trabajo)
@@ -475,7 +475,7 @@
 {
     struct tm tm;
 
-    memset(&tm, sizeof(tm), 0);
+    memset(&tm, 0, sizeof(tm));
     
     /* let mktime decide if DST is in effect */
     tm.tm_isdst = -1;


Actual result:
--------------
--------------

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports

 [2010-12-18 00:05 UTC] cataphract@php.net

-Status: Open +Status: Closed -Assigned To: +Assigned To: cataphract

 [2010-12-18 00:05 UTC] cataphract@php.net

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.