From cf8d1cdb20555165b617cffb3cb89b89ff4260e7 Mon Sep 17 00:00:00 2001 From: Dan Petro Date: Fri, 29 Mar 2013 09:28:35 -0700 Subject: [PATCH] Specify return behavior in header for evbuffer_pullup() in corner case Function returns NULL when told to pullup more data than exists --- include/event2/buffer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/event2/buffer.h b/include/event2/buffer.h index b36ee145..712e4d79 100644 --- a/include/event2/buffer.h +++ b/include/event2/buffer.h @@ -944,7 +944,8 @@ void evbuffer_cb_unsuspend(struct evbuffer *buffer, struct evbuffer_cb_entry *cb @param buf the evbuffer to make contiguous @param size the number of bytes to make contiguous, or -1 to make the entire buffer contiguous. - @return a pointer to the contiguous memory array + @return a pointer to the contiguous memory array, or NULL if param size + requested more data than is present in the buffer. */ unsigned char *evbuffer_pullup(struct evbuffer *buf, ev_ssize_t size);