apache-httpd: remove old patching logic (#6848)

This commit is contained in:
DavidKorczynski 2021-11-18 11:40:06 +00:00 committed by GitHub
parent d36ec59cb3
commit 6082915205
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 51 deletions

View File

@ -39,4 +39,3 @@ RUN git clone --depth=1 https://github.com/apache/httpd
WORKDIR httpd
COPY build.sh $SRC/
COPY fuzz_*.c $SRC/
#COPY patches.diff $SRC/

View File

@ -19,12 +19,6 @@ unset CPP
unset CXX
export LDFLAGS="-l:libbsd.a"
# We used to patch out assert statements. But since https://github.com/apache/httpd/commit/a6e5a92b0d0e74ead5a43f20f81f5cf880ea4fb8
# This does not seem to be relevant anymore.
# I will keep the lines and let the fuzzers runs for a while, then remove the patch entirely
# if it proves no longer needed.
#git apply --ignore-space-change --ignore-whitespace $SRC/patches.diff
# Download apr and place in httpd srclib folder. Apr-2.0 includes apr-utils
svn checkout https://svn.apache.org/repos/asf/apr/apr/trunk/ srclib/apr

View File

@ -1,44 +0,0 @@
diff --git a/server/apreq_parser_header.c b/server/apreq_parser_header.c
index 19588be..7067e58 100644
--- a/server/apreq_parser_header.c
+++ b/server/apreq_parser_header.c
@@ -89,7 +89,7 @@ static apr_status_t split_header_line(apreq_param_t **p,
if (s != APR_SUCCESS)
return s;
- assert(nlen >= len);
+ if (!(nlen >= len)) { return APR_EBADARG; } assert(nlen >= len);
end->iov_len = len;
nlen -= len;
@@ -103,13 +103,13 @@ static apr_status_t split_header_line(apreq_param_t **p,
if (s != APR_SUCCESS)
return s;
- assert(glen >= dlen);
+ if (!(glen >= dlen)) { return APR_EBADARG; } assert(glen >= dlen);
glen -= dlen;
e = APR_BUCKET_NEXT(e);
}
/* copy value */
- assert(vlen > 0);
+ if (!(vlen > 0)) { return APR_EBADARG; } assert(vlen > 0);
dest = v->data;
while (vlen > 0) {
@@ -119,12 +119,12 @@ static apr_status_t split_header_line(apreq_param_t **p,
memcpy(dest, data, dlen);
dest += dlen;
- assert(vlen >= dlen);
+ if (!(vlen >= dlen)) { return APR_EBADARG; } assert(vlen >= dlen);
vlen -= dlen;
e = APR_BUCKET_NEXT(e);
}
- assert(dest[-1] == '\n');
+ if (!(dest[-1] == '\n')) { return APR_EBADARG; } assert(dest[-1] == '\n');
if (dest[-2] == '\r')
--dest;