mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 13:17:34 +00:00
Tests: Un-flake the recent TestEnvironment
addition
Depending on stack values being correctly and deterministically overwritten was a bit too optimistic, to be honest. This new logic uses a value on the heap.
This commit is contained in:
parent
2cd4f135f0
commit
162a2b66eb
2 changed files with 13 additions and 29 deletions
|
@ -502,7 +502,7 @@ int putenv(char* new_var)
|
|||
auto old_var_name_max_length = strnlen(old_var, new_var_name_len);
|
||||
char* old_eq = static_cast<char*>(memchr(old_var, '=', old_var_name_max_length + 1));
|
||||
if (!old_eq)
|
||||
continue; // possibly freed or overwritten value
|
||||
continue; // name is longer, or possibly freed or overwritten value
|
||||
|
||||
auto old_var_name_len = old_eq - old_var;
|
||||
if (new_var_name_len != old_var_name_len)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue