summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2015-01-06 17:48:04 +0000
committerreyk <reyk@openbsd.org>2015-01-06 17:48:04 +0000
commit0859b34fddfdff19f1f36b3bda6e110afef66a1f (patch)
tree0bfe41fa0166cadb530ca4197fba972207e199cd
parentWe do not support freeing memory using reqbufs with a zero size so (diff)
downloadwireguard-openbsd-0859b34fddfdff19f1f36b3bda6e110afef66a1f.tar.xz
wireguard-openbsd-0859b34fddfdff19f1f36b3bda6e110afef66a1f.zip
I missed one goto abort instead of free(line).
Found by Fabian Raetz at gmail
-rw-r--r--usr.sbin/httpd/server_http.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/httpd/server_http.c b/usr.sbin/httpd/server_http.c
index 5568840e3a5..b0ae73d2e05 100644
--- a/usr.sbin/httpd/server_http.c
+++ b/usr.sbin/httpd/server_http.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server_http.c,v 1.61 2015/01/06 13:48:15 reyk Exp $ */
+/* $OpenBSD: server_http.c,v 1.62 2015/01/06 17:48:04 reyk Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -166,9 +166,8 @@ server_read_http(struct bufferevent *bev, void *arg)
/* Limit the total header length minus \r\n */
clt->clt_headerlen += linelen;
if (clt->clt_headerlen > SERVER_MAXHEADERLENGTH) {
- free(line);
server_abort_http(clt, 413, "request too large");
- return;
+ goto abort;
}
/*