mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-05 15:09:31 +03:00
increase env limit to 10000 entries (issue #685)
This commit is contained in:
parent
06f0ba232e
commit
1ded6e2dec
1 changed files with 2 additions and 2 deletions
|
@ -629,8 +629,8 @@ bool _mi_prim_getenv(const char* name, char* result, size_t result_size) {
|
||||||
if (len == 0) return false;
|
if (len == 0) return false;
|
||||||
char** env = mi_get_environ();
|
char** env = mi_get_environ();
|
||||||
if (env == NULL) return false;
|
if (env == NULL) return false;
|
||||||
// compare up to 256 entries
|
// compare up to 10000 entries
|
||||||
for (int i = 0; i < 256 && env[i] != NULL; i++) {
|
for (int i = 0; i < 10000 && env[i] != NULL; i++) {
|
||||||
const char* s = env[i];
|
const char* s = env[i];
|
||||||
if (_mi_strnicmp(name, s, len) == 0 && s[len] == '=') { // case insensitive
|
if (_mi_strnicmp(name, s, len) == 0 && s[len] == '=') { // case insensitive
|
||||||
// found it
|
// found it
|
||||||
|
|
Loading…
Add table
Reference in a new issue