php.net |  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
 [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
Automatic comment from SVN on behalf of cataphract
Revision: http://svn.php.net/viewvc/?view=revision&revision=306416
Log: - Fixed bug #53568 (swapped memset arguments in struct initialization).
 [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.


 [2011-01-11 21:55 UTC] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=307385
Log: - Fixed bug #53568 (swapped memset arguments in struct initialization) [backported]
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 07 05:01:29 2024 UTC