]> git.ipfire.org Git - thirdparty/curl.git/commit
wakeup_write: make sure the eventfd write sends eight bytes
authorDaniel Stenberg <daniel@haxx.se>
Fri, 7 Feb 2025 13:57:36 +0000 (14:57 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 7 Feb 2025 15:44:39 +0000 (16:44 +0100)
commitc2aa504ab9148b5c284b090c5043d9f0c3fbd903
treec9624652d8cb7d483a90899a2840e61ccf9bc7a4
parentc012c6062e963085f915975464e887264bf741fd
wakeup_write: make sure the eventfd write sends eight bytes

The eventfd manpage says:

  A write(2) fails with the error EINVAL if the size of the supplied
  buffer is less than 8 bytes

When doing x32 on a 64-bit system, pointers are still four bytes so this
code must not use the size of a pointer but the size of a 64-bit type.

Fixes #16237
Reported-by: Jan Engelhardt
Closes #16239
lib/asyn-thread.c
lib/multi.c