diff --git a/ext/gd/libgd/gd_topal.c b/ext/gd/libgd/gd_topal.c index a92a7acb17a43..2a9fb3d608dc8 100644 --- a/ext/gd/libgd/gd_topal.c +++ b/ext/gd/libgd/gd_topal.c @@ -1498,7 +1498,7 @@ static int gdImageTrueColorToPaletteBody (gdImagePtr oim, int dither, int colors colorsWanted = maxColors; } if (!cimP) { - nim->pixels = gdCalloc (sizeof (unsigned char *), oim->sy); + nim->pixels = gdCalloc (oim->sy, sizeof (unsigned char *)); if (!nim->pixels) { /* No can do */ @@ -1506,7 +1506,7 @@ static int gdImageTrueColorToPaletteBody (gdImagePtr oim, int dither, int colors } for (i = 0; (i < nim->sy); i++) { - nim->pixels[i] = gdCalloc (sizeof (unsigned char *), oim->sx); + nim->pixels[i] = gdCalloc (oim->sx, sizeof (unsigned char *)); if (!nim->pixels[i]) { goto outOfMemory; @@ -1514,7 +1514,7 @@ static int gdImageTrueColorToPaletteBody (gdImagePtr oim, int dither, int colors } } - cquantize = (my_cquantize_ptr) gdCalloc (sizeof (my_cquantizer), 1); + cquantize = (my_cquantize_ptr) gdCalloc (1, sizeof (my_cquantizer)); if (!cquantize) { /* No can do */ diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index 765e05e1358e3..c4f86b0e7d320 100644 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -581,7 +581,7 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori } if (!S->current_row) { - S->current_row = ecalloc(sizeof(zval), stmt->column_count); + S->current_row = ecalloc(stmt->column_count, sizeof(zval)); } for (unsigned i = 0; i < stmt->column_count; i++) { zval_ptr_dtor_nogc(&S->current_row[i]); diff --git a/ext/readline/readline.c b/ext/readline/readline.c index db2776fb27a9a..1bd5e2fd6059a 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -456,7 +456,7 @@ char **php_readline_completion_cb(const char *text, int start, int end) matches = rl_completion_matches(text,_readline_command_generator); } else { /* libedit will read matches[2] */ - matches = calloc(sizeof(char *), 3); + matches = calloc(3, sizeof(char *)); if (!matches) { return NULL; }