summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2020-10-28 15:17:49 -0700
committerJeremy Evans <code@jeremyevans.net>2020-10-29 08:08:42 -0700
commitc0aeb98aa903334f06758d39c772cb22440d8a4e (patch)
tree95f414628d555fad347afbeaa339f8e3d21b3ef2 /vm.c
parent07c03bc30984a496558d9e830bc4fb2f8cfb1854 (diff)
Make ENV.replace handle multiple environ entries with the same key
While it is expected that all environment keys are unique, that is not enforced. It is possible by manipulating environ directly you can call a process with an environment with duplicate keys. If ENV.replace was passed a hash with a key where environ had a duplicate for that key, ENV.replace would end up deleting the key from environ. The fix in this case is to not assume that the environment key list has unique keys, and continue processing the entire key list in keylist_delete. Fixes [Bug #17254]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3716
Diffstat (limited to 'vm.c')
0 files changed, 0 insertions, 0 deletions