summaryrefslogtreecommitdiffstats
path: root/lib/libevent/buffer.c
AgeCommit message (Collapse)AuthorFilesLines
2019-05-03Fixed endless loop/ OOB write on 64 bit systems with large buffers.tobias1-3/+3
If a buffer exceeds UINT_MAX (which is only possible on 64 bit systems) an endless loop or OOB write can occur in buffer-specific readline functions. Switching variables in function scope to size_t solves these issue because relevant fields in struct buffer are already size_t. ok cheloha, deraadt, nicm, tedu
2017-03-18Use recallocarray() to avoid leaving detritus in memory when resizingderaadt1-2/+3
the string buffer. ok jsing millert
2016-09-03Remove NULL pointer checks before calls to free().nayden1-3/+2
OK bluhm@ nicm@
2015-02-05Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@millert1-2/+2
2015-01-05Fix CVE-2014-6272 in Libevent 1.4 from upstream:bluhm1-9/+23
- https://github.com/libevent/libevent/commit/7b21c4eabf1f3946d3f63cce1319c490caab8ecf - For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. On top of that do: - Update libevent version to 1.4.15-stable. - Use SIZE_MAX from limits.h instead of a private define. - Do not declare 'size_t need' twice to avoid a compiler warning. OK sthen
2014-11-21libraries shouldnt print to stderr when things dont go their way.dlg1-3/+3
switch fprintf(stderr) over to event_warn() on malloc failure. fix up an errant newline in an existing event_warn while there. originally i just wanted to delete the fprintf diff from nicm@ who is away from a keyboard right now so cant commit guenther@ agrees with the idea
2014-10-30Fix whitespace errors in libevent.bluhm1-6/+6
OK nicm@
2014-10-29After removing all the #ifdef, the wrappers in evutil are ratherbluhm1-3/+2
useless. Let libevent call the libc functions directly. OK nicm@
2014-10-18Remove some #ifdef from libevent.bluhm1-6/+1
OK nicm@
2014-10-18Remove the remaining #ifdef HAVE_ and the #define _GNU_SOURCE.bluhm1-6/+1
OK nicm@
2014-10-17Remove #ifdef HAVE_.*_H, just include the header files.bluhm1-12/+2
Do not include sys/param.h. OK nicm@
2014-10-16Remove #ifdef HAVE_CONFIG_H, there is no config.h file.bluhm1-5/+1
OK nicm@
2014-10-08iRemove the #ifdef WIN32 implementation from libevent.bluhm1-19/+1
OK nicm@
2010-07-17add missing header needed by event_warn()chl1-1/+2
ok nicm@
2010-07-12Update to 1.4.14b.nicm1-3/+5
From their change log: o Fix memory-leak of signal handler array with kqueue. [backport] o Make evutil_make_socket_nonblocking() leave any other flags alone. o Adjusted fcntl() retval comparison on evutil_make_socket_nonblocking(). o Re-add event_siglcb; some old code _was_ still using it. :( o Fix a free(NULL) in min_heap.h o Clean up properly when adding a signal handler fails. Also a local change to use an int rather than a long for fcntl(). ok guenther deraadt
2010-04-21Update libevent to 1.4.13.nicm1-38/+112
This is the core library only, the DNS parts are removed and it does not include the other extra bits (HTTP, DNS, and RPC), a separate port for these will appear in due course. Thanks to jsg, sthen, alek, gilles, jacekm, bernd and any others I've forgotten for testing/comments. Note that /usr/include/evdns.h should be removed after updating. ok deraadt
2009-10-13In evbuffer_readline, do not lose data upon malloc failure. From mainstream:jacekm1-2/+1
http://levent.svn.sourceforge.net/viewvc/levent?view=rev&revision=1436 ok gilles@
2008-05-02Update to libevent 1.3e while retaining our local changes.brad1-9/+13
"No objection" millert@ "the diff looks and works fine" reyk@
2007-03-19Update to libevent-1.3b while retaining our local changes. beck@ OKmillert1-8/+11
2007-02-04Two libevent fixes from the SVN repo:millert1-4/+5
allow gotsig to terminate active event loop and evbuffer_find fix. OK brad@ pyr@
2006-12-21'tranfer' -> 'transfer' in comments.krw1-2/+2
2006-11-26fix a potential problem in multiple handling of va_list; use va_copy instead.brad1-4/+10
From Niels Provos via the libevent SVN, by Alejo. ok deraadt@
2006-03-18- limit the amount of data bufferevents are going to consume to somethingbrad1-3/+18
reasonable; in some circumstances it could happen that libevent happily allocated 100MB in read buffers without telling the user; found by christopher maxwell - parts of these changes are from his patch. - allow setting an event base for bufferevents; from phil oleson - improved manpage from Phil Oleson From libevent CVS
2006-01-25another fix from art.brad1-3/+3
From libevent CVS
2006-01-23add evbuffer_add_vprintf interface from artur grabowskibrad1-27/+35
From libevent CVS ok markus@
2005-07-02zap trailing whitespaces, no binary changegrunk1-3/+3
ok brad@ beck@
2005-06-18update to libevent 1.1a; keep local changesbrad1-4/+4
ok grunk@
2005-05-04update to libevent 1.0d; keep local changesbrad1-2/+49
thanks to Alexander von Gernler for testing and some bug fixes ok mpf@ norby@
2005-04-22update to libevent 1.0c; keep local changesbrad1-23/+179
no shared lib so no ABI/API check is necessary thanks to Alexander von Gernler for submitting another diff in an attempt to update libevent and for a use-after-free fix. ok henning@ deraadt@
2005-04-19backout. not discussed, and very wrong. bad bradderaadt1-179/+23
2005-04-19update to libevent 1.0c; keep local changesbrad1-23/+179
2004-04-28update to libevent 0.8; keep local changesbrad1-0/+222
ok markus@