]> git.kaiwu.me - njs.git/commit
Fixed Response headers iteration in Fetch API.
authorDmitry Volyntsev <xeioex@nginx.com>
Thu, 14 Apr 2022 23:07:34 +0000 (16:07 -0700)
committerDmitry Volyntsev <xeioex@nginx.com>
Thu, 14 Apr 2022 23:07:34 +0000 (16:07 -0700)
commit675049dc2ce07a06d5e6d65ab8664e49c7659d3a
tree7f1ece731e32c01b35c7a5cdb0f7bf765376477e
parent80aff9dcd23ae5fb53694e20d8127b3f24ffe1d8
Fixed Response headers iteration in Fetch API.

Previously, heap-use-after-free might occur when HTTP Response was
received with more than 8 headers and headers iteration is used.

The fix is not to assume that pointer to the beginning of the keys array
never changes.  The pointer may change when array is resized.

The issue was introduced in 81040de6b085 (0.5.1).

This closes #492 issue on Github.
nginx/ngx_js_fetch.c