]> granicus.if.org Git - php/commitdiff
fix datatype mismatch
authorAnatol Belski <ab@php.net>
Mon, 27 Oct 2014 17:42:45 +0000 (18:42 +0100)
committerAnatol Belski <ab@php.net>
Tue, 28 Oct 2014 16:24:50 +0000 (17:24 +0100)
main/php_scandir.c

index 7dfec7bff7920f6f137d96afb2091417c3b84bde..5275f3ddd36351a0ac4b6d00a012dde5b027f145 100644 (file)
@@ -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) {