summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/php_scandir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/php_scandir.c b/main/php_scandir.c
index 7dfec7bff7..5275f3ddd3 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) {