mirror of
https://github.com/boostorg/build.git
synced 2026-02-18 01:52:17 +00:00
Do not read pipe content at available size peeking
Currently the same data is read twice. The first time a buffer is filled by `PeekNamedPipe` and second time it is overwritten with the same content by `ReadFile`.
This commit is contained in:
@@ -770,7 +770,7 @@ static void read_pipe
|
||||
for (;;)
|
||||
{
|
||||
/* check if we have any data to read */
|
||||
if ( !PeekNamedPipe( in, ioBuffer, IO_BUFFER_SIZE, &bytesInBuffer,
|
||||
if ( !PeekNamedPipe( in, NULL, IO_BUFFER_SIZE, NULL,
|
||||
&bytesAvailable, NULL ) || bytesAvailable == 0 )
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user