1 Star 0 Fork 36

panzhe / httpd

forked from src-openEuler / httpd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-CVE-2021-34798.patch 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
From fa7b2a5250e54363b3a6c8ac3aaa7de4e8da9b2e Mon Sep 17 00:00:00 2001
From: Yann Ylavic <ylavic@apache.org>
Date: Tue, 7 Sep 2021 16:05:31 +0000
Subject: [PATCH] Merge r1878092 from trunk:
Fix a NULL pointer dereference
* server/scoreboard.c (ap_increment_counts): In certain cases like certain
invalid requests r->method might be NULL here. r->method_number defaults
to M_GET and hence is M_GET in these cases.
Submitted by: rpluem
Reviewed by: covener, ylavic, jfclere
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893051 13f79535-47bb-0310-9956-ffa450edef68
---
server/scoreboard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/scoreboard.c b/server/scoreboard.c
index b40b45df590..12dd56abead 100644
--- a/server/scoreboard.c
+++ b/server/scoreboard.c
@@ -388,7 +388,7 @@ AP_DECLARE(void) ap_increment_counts(ap_sb_handle_t *sb, request_rec *r)
if (pfn_ap_logio_get_last_bytes != NULL) {
bytes = pfn_ap_logio_get_last_bytes(r->connection);
}
- else if (r->method_number == M_GET && r->method[0] == 'H') {
+ else if (r->method_number == M_GET && r->method && r->method[0] == 'H') {
bytes = 0;
}
else {
1
https://gitee.com/panzhe0328/httpd.git
git@gitee.com:panzhe0328/httpd.git
panzhe0328
httpd
httpd
master

搜索帮助