Issue 1 in msgbus: errors serving files in msgbus.c msgbus_doc_handler()

1 view
Skip to first unread message

codesite...@google.com

unread,
Sep 26, 2008, 11:49:33 AM9/26/08
to msgbu...@googlegroups.com
Issue 1: errors serving files in msgbus.c msgbus_doc_handler()
http://code.google.com/p/msgbus/issues/detail?id=1

New issue report by charles.t.kerr:
There are a couple of bugs in msgbus_doc_handler() that are quick
one-liners to fix:

(1) the file descriptor `fd' is leaked. It needs to be close()d after the
call to evbuffer_read().

(2) when you pass -1 in as the length argument to evbuffer_read(), libevent
will try to read a EVBUFFER_MAX_READ-sized chunk, rather the entire file,
so msgbus_doc_handler() may be serving up truncated files. Unless you're
serving multi-GiB files, the simplest fix is to replace -1 with INT_MAX.


Issue attributes:
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

Reply all
Reply to author
Forward
0 new messages