summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd/ssl.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2007-02-08 13:32:25 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2007-02-08 13:32:25 +0000
commit0ae251368e20313e60a071549d04cb246ecf9d0a (patch)
tree9a87bef487bdb3c936993cb48cd01ef6a23251c3 /usr.sbin/relayd/ssl.c
parent352d740dd85eb470c920da7405b235e0849a6c80 (diff)
carefully check some return values and make lint happier. never pass
any truncated strings (table names/anchors/tags/...) to pf and the kernel. ok pyr@
Diffstat (limited to 'usr.sbin/relayd/ssl.c')
-rw-r--r--usr.sbin/relayd/ssl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/relayd/ssl.c b/usr.sbin/relayd/ssl.c
index 87c887d5e21..ddac5c5974c 100644
--- a/usr.sbin/relayd/ssl.c
+++ b/usr.sbin/relayd/ssl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl.c,v 1.5 2007/02/07 14:39:45 reyk Exp $ */
+/* $OpenBSD: ssl.c,v 1.6 2007/02/08 13:32:24 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -94,8 +94,8 @@ ssl_read(int s, short event, void *arg)
}
return;
}
- buf_add(cte->buf, rbuf, ret);
-
+ if (buf_add(cte->buf, rbuf, ret) == -1)
+ fatal("ssl_read: buf_add error");
if (cte->validate_read != NULL) {
if (cte->validate_read(cte) != 0)
goto retry;