Unverified Commit e8a5f7bf authored by Anna Henningsen's avatar Anna Henningsen Committed by Ruben Bridgewater
Browse files

src: use correct OOB check for IPv6 parsing

`last_piece` pointed to the end of the 8×16 bit array,
so `piece_pointer == last_piece` already means that the pointer
is not writable any longer.

Previously, this still worked most of the time but could
result in an out-of-bounds-write.

Also, rename `last_piece` to `buffer_end` to avoid this pitfall.

PR-URL: https://github.com/nodejs/node/pull/17470


Reviewed-By: default avatarTimothy Gu <timothygu99@gmail.com>
parent 9236dfe1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment