diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-01-25 05:25:35 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-01-25 05:25:35 +0000 |
commit | 86d8a6d4d92f3a13acc6e7e5d37a13c24e00a053 (patch) | |
tree | d57bf15afa52111547ab4e085bcd340cbc06dcce /lib/libevent/buffer.c | |
parent | c08b582937feb6f22278f686c357f46b334609ed (diff) |
another fix from art.
From libevent CVS
Diffstat (limited to 'lib/libevent/buffer.c')
-rw-r--r-- | lib/libevent/buffer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libevent/buffer.c b/lib/libevent/buffer.c index 3ec3f444385..404c62bf9ad 100644 --- a/lib/libevent/buffer.c +++ b/lib/libevent/buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.c,v 1.8 2006/01/23 20:18:20 brad Exp $ */ +/* $OpenBSD: buffer.c,v 1.9 2006/01/25 05:25:33 brad Exp $ */ /* * Copyright (c) 2002, 2003 Niels Provos <provos@citi.umich.edu> @@ -151,7 +151,7 @@ evbuffer_add_vprintf(struct evbuffer *buf, const char *fmt, va_list ap) (*buf->cb)(buf, oldoff, buf->off, buf->cbarg); return (sz); } - if (evbuffer_expand(buf, sz) == -1) + if (evbuffer_expand(buf, sz + 1) == -1) return (-1); } @@ -407,7 +407,7 @@ evbuffer_write(struct evbuffer *buffer, int fd) } u_char * -evbuffer_find(struct evbuffer *buffer, u_char *what, size_t len) +evbuffer_find(struct evbuffer *buffer, const u_char *what, size_t len) { size_t remain = buffer->off; u_char *search = buffer->buffer; |