]> granicus.if.org Git - php/commitdiff
Fixed wrong arguments order
authorDmitry Stogov <dmitry@php.net>
Thu, 17 Jul 2008 13:22:32 +0000 (13:22 +0000)
committerDmitry Stogov <dmitry@php.net>
Thu, 17 Jul 2008 13:22:32 +0000 (13:22 +0000)
ext/phar/phar.c
ext/phar/zip.c

index d8c9bb78d9b302bdf0655bab7f6b83ff406f970c..db5b80f1e13403740f68f42c5768b5f224ded551 100644 (file)
@@ -963,7 +963,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char
                MAPPHAR_FAIL("internal corruption of phar \"%s\" (too many manifest entries for size of manifest)")
        }
 
-       mydata = pecalloc(sizeof(phar_archive_data), 1, PHAR_G(persist));
+       mydata = pecalloc(1, sizeof(phar_archive_data), PHAR_G(persist));
        mydata->is_persistent = PHAR_G(persist);
 
        /* check whether we have meta data, zero check works regardless of byte order */
@@ -1281,7 +1281,7 @@ int phar_create_or_parse_filename(char *fname, int fname_len, char *alias, int a
        }
 
        /* set up our manifest */
-       mydata = ecalloc(sizeof(phar_archive_data), 1);
+       mydata = ecalloc(1, sizeof(phar_archive_data));
 
        mydata->fname = expand_filepath(fname, NULL TSRMLS_CC);
        fname_len = strlen(mydata->fname);
index 4ee7073b06c5d4edd1ccb74f53fdf9fafd7a4467..e0ac5f2668f2acf1af23661c984dd312dd05c217 100644 (file)
@@ -193,7 +193,7 @@ int phar_parse_zipfile(php_stream *fp, char *fname, int fname_len, char *alias,
                                php_stream_close(fp);
                                return FAILURE;
                        }
-                       mydata = pecalloc(sizeof(phar_archive_data), 1, PHAR_G(persist));
+                       mydata = pecalloc(1, sizeof(phar_archive_data), PHAR_G(persist));
                        mydata->is_persistent = PHAR_G(persist);
 
                        /* read in archive comment, if any */