mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-01 15:18:06 +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
Notes:
sideshowbarker
2024-07-17 03:16:02 +09:00
Author: https://github.com/gmta
Commit: 162a2b66eb
Pull-request: https://github.com/SerenityOS/serenity/pull/19278
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