Skip to content

Commit 7f4ef73

Browse files
author
Andre Malo
committed
don't segfault, when setting an empty header value
Reviewed by: Brad Nicholes, Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@103495 13f79535-47bb-0310-9956-ffa450edef68
1 parent 4265eca commit 7f4ef73

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

CHANGES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Changes with Apache 2.0.50
22

3+
*) mod_headers no longer crashes if an empty header value should
4+
be added. [Andr� Malo]
5+
36
*) Fix segfault in mod_expires, which occured under certain
47
circumstances. PR 28047. [Andr� Malo]
58

STATUS

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
APACHE 2.0 STATUS: -*-text-*-
2-
Last modified at [$Date: 2004/04/24 11:43:01 $]
2+
Last modified at [$Date: 2004/04/24 11:51:06 $]
33

44
Release:
55

@@ -93,10 +93,6 @@ PATCHES TO BACKPORT FROM 2.1
9393
server/core.c: r1.275
9494
+1: nd
9595

96-
*) mod_headers: don't segfault, when supplying an empty header value
97-
modules/metadata/mod_headers.c: r1.56
98-
+1: nd, bnicholes, trawick
99-
10096
*) mod_headers: Backport ErrorHeader directive (regression from 1.3)
10197
modules/metadata/mod_headers.c: r1.44, 1.45, 1.51
10298
+1: nd, trawick

modules/metadata/mod_headers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ static char* process_tags(header_entry *hdr, request_rec *r)
435435
else
436436
str = apr_pstrcat(r->pool, str, s, NULL);
437437
}
438-
return str;
438+
return str ? str : "";
439439
}
440440

441441
static int echo_header(echo_do *v, const char *key, const char *val)

0 commit comments

Comments
 (0)