buffer: make evbuffer_prepend() of zero-length array no-op

Refs: #774
(cherry picked from commit c4fbae3ae6166dddfa126734edd63213afa14dce)
This commit is contained in:
Azat Khuzhin 2019-03-03 19:03:29 +03:00
parent 6a3dd717bc
commit 61fa7b7d80
No known key found for this signature in database
GPG Key ID: B86086848EF8686D

View File

@ -1829,6 +1829,10 @@ evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen)
EVBUFFER_LOCK(buf); EVBUFFER_LOCK(buf);
if (datlen == 0) {
result = 0;
goto done;
}
if (buf->freeze_start) { if (buf->freeze_start) {
goto done; goto done;
} }