diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2024-10-31 11:52:26 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2024-10-31 13:15:29 +0100 |
commit | 1f05c040599afe63af8c7ecfe71bc461f393600d (patch) | |
tree | 71c81733dd631ddadd8446e265fd812a61cbc513 /winsup/COPYING | |
parent | 04f386e9af997d0929e90556cce712346bef0d68 (diff) | |
download | newlib-1f05c040599afe63af8c7ecfe71bc461f393600d.zip newlib-1f05c040599afe63af8c7ecfe71bc461f393600d.tar.gz newlib-1f05c040599afe63af8c7ecfe71bc461f393600d.tar.bz2 |
Cygwin: pipe: fix shift value
The expression computing the next-less-power of 2 for the next write
when the pipe buffer is getting filled up allows negative shift values.
This works on Intel CPUs because the shift expression only evaluates the
5 LSBs, but it's undefined behaviour per the C standard. Use the
correct expression to get a positive shift value.
Fixes: 170e6badb621 ("Cygwin: pipe: improve writing when pipe buffer is almost full")
Reported-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/COPYING')
0 files changed, 0 insertions, 0 deletions