From: Stefan Eissing Date: Thu, 28 Apr 2022 10:41:48 +0000 (+0000) Subject: *) mod_http2: remove unused and insecure code. Fixes PR66037. X-Git-Tag: 2.5.0-alpha2-ci-test-only~360 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc894406d8e2c2afb79269dcb6190c28837fc142;p=thirdparty%2Fapache%2Fhttpd.git *) mod_http2: remove unused and insecure code. Fixes PR66037. Thanks to Ronald Crane (Zippenhop LLC) for reporting this. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1900356 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/changes-entries/pr66037.txt b/changes-entries/pr66037.txt new file mode 100644 index 00000000000..7262ff28c01 --- /dev/null +++ b/changes-entries/pr66037.txt @@ -0,0 +1,3 @@ + *) mod_http2: remove unused and insecure code. Fixes PR66037. + Thanks to Ronald Crane (Zippenhop LLC) for reporting this. + [Stefan Eissing] \ No newline at end of file diff --git a/modules/http2/h2_util.c b/modules/http2/h2_util.c index 467d01db2f9..7a9466eacca 100644 --- a/modules/http2/h2_util.c +++ b/modules/http2/h2_util.c @@ -76,26 +76,6 @@ size_t h2_util_hex_dump(char *buffer, size_t maxlen, return strlen(buffer); } -size_t h2_util_header_print(char *buffer, size_t maxlen, - const char *name, size_t namelen, - const char *value, size_t valuelen) -{ - size_t offset = 0; - size_t i; - for (i = 0; i < namelen && offset < maxlen; ++i, ++offset) { - buffer[offset] = name[i]; - } - for (i = 0; i < 2 && offset < maxlen; ++i, ++offset) { - buffer[offset] = ": "[i]; - } - for (i = 0; i < valuelen && offset < maxlen; ++i, ++offset) { - buffer[offset] = value[i]; - } - buffer[offset] = '\0'; - return offset; -} - - void h2_util_camel_case_header(char *s, size_t len) { size_t start = 1; diff --git a/modules/http2/h2_util.h b/modules/http2/h2_util.h index 8ef944c8e0f..5a3dbe51420 100644 --- a/modules/http2/h2_util.h +++ b/modules/http2/h2_util.h @@ -28,10 +28,6 @@ struct nghttp2_frame; size_t h2_util_hex_dump(char *buffer, size_t maxlen, const char *data, size_t datalen); -size_t h2_util_header_print(char *buffer, size_t maxlen, - const char *name, size_t namelen, - const char *value, size_t valuelen); - void h2_util_camel_case_header(char *s, size_t len); int h2_util_frame_print(const nghttp2_frame *frame, char *buffer, size_t maxlen);