FreeBSD Bugzilla – Attachment 229892 Details for
Bug 260182
www/lighttpd: checkconfig on service restart
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Suggested patch
lighttpd-segfault.patch (text/plain), 3.45 KB, created by
Dirk Meyer
on 2021-12-04 13:04:53 UTC
(
hide
)
Description:
Suggested patch
Filename:
MIME Type:
Creator:
Dirk Meyer
Created:
2021-12-04 13:04:53 UTC
Size:
3.45 KB
patch
obsolete
>diff -ur --exclude=CVS --exclude=Makefile.local --ex ./Makefile /usr/ports/current/lighttpd/Makefile >--- ./Makefile 2021-12-02 15:50:39.334428000 +0100 >+++ /usr/ports/current/lighttpd/Makefile 2021-12-04 13:39:23.345939000 +0100 >@@ -2,6 +2,7 @@ > > PORTNAME?= lighttpd > PORTVERSION= 1.4.62 >+PORTREVISION= 1 > CATEGORIES?= www > MASTER_SITES?= https://download.lighttpd.net/lighttpd/releases-1.4.x/ > >diff -ur --exclude=CVS --exclude=Makefile.local --ex ./files/lighttpd.in /usr/ports/current/lighttpd/files/lighttpd.in >--- ./files/lighttpd.in 2021-10-17 20:16:09.206916000 +0200 >+++ /usr/ports/current/lighttpd/files/lighttpd.in 2021-11-05 13:57:54.447426000 +0100 >@@ -47,7 +47,7 @@ > > command=%%PREFIX%%/sbin/lighttpd > stop_postcmd=stop_postcmd >-#restart_precmd="lighttpd_checkconfig" >+restart_precmd="lighttpd_checkconfig" > graceful_precmd="lighttpd_checkconfig" > graceful_cmd="lighttpd_graceful" > gracefulstop_cmd="lighttpd_gracefulstop" >diff -ur --exclude=CVS --exclude=Makefile.local --ex ./files/patch-h2.c /usr/ports/current/lighttpd/files/patch-h2.c >--- ./files/patch-h2.c 1970-01-01 01:00:00.000000000 +0100 >+++ /usr/ports/current/lighttpd/files/patch-h2.c 2021-12-04 13:36:13.124684000 +0100 >@@ -0,0 +1,11 @@ >+--- src/h2.c.orig 2021-12-02 04:53:23 UTC >++++ src/h2.c >+@@ -2573,7 +2573,7 @@ h2_init_stream (request_st * const h2r, connection * c >+ #ifdef HAVE_PCRE >+ if (srv->config_captures) >+ memcpy(r->cond_match, h2r->cond_match, >+- srv->config_captures * sizeof(cond_match_t)); >++ srv->config_captures * sizeof(cond_match_t *)); >+ #endif >+ /*(see request_config_reset() and request_reset_ex())*/ >+ r->server_name = h2r->server_name; >diff -ur --exclude=CVS --exclude=Makefile.local --ex ./files/patch-reqpool.c /usr/ports/current/lighttpd/files/patch-reqpool.c >--- ./files/patch-reqpool.c 1970-01-01 01:00:00.000000000 +0100 >+++ /usr/ports/current/lighttpd/files/patch-reqpool.c 2021-12-04 13:36:13.132772000 +0100 >@@ -0,0 +1,19 @@ >+--- src/reqpool.c.orig 2021-12-02 04:53:23 UTC >++++ src/reqpool.c >+@@ -67,6 +67,7 @@ request_init_data (request_st * const r, connection * >+ >+ #ifdef HAVE_PCRE >+ if (srv->config_captures) {/*(save 128b per con if no regex conditions)*/ >++ r->cond_captures = srv->config_captures; >+ r->cond_match = calloc(srv->config_captures, sizeof(cond_match_t *)); >+ force_assert(NULL != r->cond_match); >+ r->cond_match_data = calloc(srv->config_captures, sizeof(cond_match_t)); >+@@ -232,7 +233,7 @@ request_free_data (request_st * const r) >+ free(r->cond_cache); >+ #ifdef HAVE_PCRE >+ if (r->cond_match_data) { >+- for (int i = 0, used = r->con->srv->config_captures; i < used; ++i) { >++ for (int i = 0, used = r->cond_captures; i < used; ++i) { >+ #ifdef HAVE_PCRE2_H >+ if (r->cond_match_data[i].match_data) >+ pcre2_match_data_free(r->cond_match_data[i].match_data); >diff -ur --exclude=CVS --exclude=Makefile.local --ex ./files/patch-request.h /usr/ports/current/lighttpd/files/patch-request.h >--- ./files/patch-request.h 1970-01-01 01:00:00.000000000 +0100 >+++ /usr/ports/current/lighttpd/files/patch-request.h 2021-12-04 13:36:13.141465000 +0100 >@@ -0,0 +1,10 @@ >+--- src/request.h.orig 2021-12-02 04:53:23 UTC >++++ src/request.h >+@@ -194,6 +194,7 @@ struct request_st { >+ struct chunkqueue reqbody_queue; /*(might use tempfiles)*/ >+ >+ struct stat_cache_entry *tmp_sce; /*(value valid only in sequential code)*/ >++ int cond_captures; >+ }; >+ >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 260182
:
229853
|
229889
|
229892