|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
47 + 30 = ?
Subscribe to this entry?

 [2010-12-17 23:42 UTC] crrodriguez at opensuse dot org
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:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-18 00:05 UTC]
Automatic comment from SVN on behalf of cataphract
Log: - Fixed bug #53568 (swapped memset arguments in struct initialization).
 [2010-12-18 00:05 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: cataphract
 [2010-12-18 00:05 UTC]
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
Thank you for the report, and for helping us make PHP better.

 [2011-01-11 21:55 UTC]
Automatic comment from SVN on behalf of felipe
Log: - Fixed bug #53568 (swapped memset arguments in struct initialization) [backported]
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Oct 24 12:01:23 2020 UTC