mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
Refine allocation
None of currently supported codepages would claim more than 5 bytes per a multibyte glyph, that's (255*5+1)kb, not 2kb anymore.
This commit is contained in:
parent
4764574910
commit
6f41ca4de1
@ -37,7 +37,7 @@ DIR *opendir(const char *dir)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dp = (DIR *) calloc(1, sizeof(DIR) + MAXPATHLEN*sizeof(char));
|
||||
dp = (DIR *) calloc(1, sizeof(DIR) + (_MAX_FNAME*5+1)*sizeof(char));
|
||||
if (dp == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user