1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 10:43:30 +02:00

Fix allocation

This commit is contained in:
Anatol Belski
2017-11-27 21:18:08 +01:00
parent 2868ff84df
commit 06202f0feb
+1 -1
View File
@@ -4098,7 +4098,7 @@ PHP_FUNCTION(getenv)
RETURN_EMPTY_STRING();
}
valw = emalloc(size);
valw = emalloc((size + 1) * sizeof(wchar_t));
size = GetEnvironmentVariableW(keyw, valw, size);
if (size == 0) {
/* has been removed between the two calls */