summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-01-25 05:25:35 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-01-25 05:25:35 +0000
commit86d8a6d4d92f3a13acc6e7e5d37a13c24e00a053 (patch)
treed57bf15afa52111547ab4e085bcd340cbc06dcce /lib
parentc08b582937feb6f22278f686c357f46b334609ed (diff)
another fix from art.
From libevent CVS
Diffstat (limited to 'lib')
-rw-r--r--lib/libevent/buffer.c6
-rw-r--r--lib/libevent/event.34
-rw-r--r--lib/libevent/event.h4
3 files changed, 7 insertions, 7 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;
diff --git a/lib/libevent/event.3 b/lib/libevent/event.3
index da0149692d3..11651af2ff1 100644
--- a/lib/libevent/event.3
+++ b/lib/libevent/event.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: event.3,v 1.23 2006/01/23 20:18:20 brad Exp $
+.\" $OpenBSD: event.3,v 1.24 2006/01/25 05:25:34 brad Exp $
.\"
.\" Copyright (c) 2000 Artur Grabowski <art@openbsd.org>
.\" All rights reserved.
@@ -163,7 +163,7 @@
.Ft int
.Fn "evbuffer_read" "struct evbuffer *buf" "int fd" "int size"
.Ft "u_char *"
-.Fn "evbuffer_find" "struct evbuffer *buf" "u_char *data" "size_t size"
+.Fn "evbuffer_find" "struct evbuffer *buf" "const u_char *data" "size_t size"
.Ft "char *"
.Fn "evbuffer_readline" "struct evbuffer *buf"
.Ft int
diff --git a/lib/libevent/event.h b/lib/libevent/event.h
index f20fd4ecb48..9e79233123c 100644
--- a/lib/libevent/event.h
+++ b/lib/libevent/event.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: event.h,v 1.13 2006/01/23 20:18:20 brad Exp $ */
+/* $OpenBSD: event.h,v 1.14 2006/01/25 05:25:34 brad Exp $ */
/*
* Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu>
@@ -268,7 +268,7 @@ int evbuffer_add_vprintf(struct evbuffer *, const char *fmt, va_list ap);
void evbuffer_drain(struct evbuffer *, size_t);
int evbuffer_write(struct evbuffer *, int);
int evbuffer_read(struct evbuffer *, int, int);
-u_char *evbuffer_find(struct evbuffer *, u_char *, size_t);
+u_char *evbuffer_find(struct evbuffer *, const u_char *, size_t);
void evbuffer_setcb(struct evbuffer *, void (*)(struct evbuffer *, size_t, size_t, void *), void *);
#ifdef __cplusplus