mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-12 22:10:12 -04:00
Fix assert() condition in evbuffer_drain() for IOCP
In the case of iocp, in the for loop above, there is a situation where: remaining == chain->off == 0 And this happens due to CHAIN_PINNED_R() case (that is used only in buffer_iocp.c) Closes: #630 (picked) (cherry picked from commit ab3224c3e66cf92779f8bd91ffe90445e636fa50)
This commit is contained in:
parent
8886eed498
commit
d632610468
2
buffer.c
2
buffer.c
@ -1146,7 +1146,7 @@ evbuffer_drain(struct evbuffer *buf, size_t len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
buf->first = chain;
|
buf->first = chain;
|
||||||
EVUTIL_ASSERT(remaining < chain->off);
|
EVUTIL_ASSERT(remaining <= chain->off);
|
||||||
chain->misalign += remaining;
|
chain->misalign += remaining;
|
||||||
chain->off -= remaining;
|
chain->off -= remaining;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user