From 99d12cf2026b7363f874bcbf7b19b5c204210553 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 27 Oct 2014 18:42:45 +0100 Subject: [PATCH] fix datatype mismatch --- main/php_scandir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/php_scandir.c b/main/php_scandir.c index 7dfec7bff79..5275f3ddd36 100644 --- a/main/php_scandir.c +++ b/main/php_scandir.c @@ -97,7 +97,7 @@ PHPAPI int php_scandir(const char *dirname, struct dirent **namelist[], int (*se vector = newv; } - dsize = sizeof (struct dirent) + ((strlen(dp->d_name) + 1) * sizeof(char)); + dsize = sizeof (struct dirent) + (((int)strlen(dp->d_name) + 1) * sizeof(char)); newdp = (struct dirent *) malloc(dsize); if (newdp == NULL) {