Commit 2fdeb7e9 authored by Ole André Vadla Ravnås's avatar Ole André Vadla Ravnås Committed by Trevor Norris
Browse files

uv: fix size calculation in select() fallback

Original commit message:

  darwin: fix size calculation in select() fallback

  Apple's `fd_set` stores its bits in an array of 32-bit integers, which
  means `FD_ISSET()` may read out of bounds if we allocate storage at
  byte granularity. There's also a chance that the `select()` call could
  corrupt the heap, although I didn't investigate that.

  This issue was discovered by LLVM's AddressSanitizer which caught
  `FD_ISSET()` trying to read out of bounds.

Ref: https://github.com/libuv/libuv/pull/241



Reviewed-By: default avatarJulien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/9179
parent 9613ac7c
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