packages: lighttpd/lighttpd-branch.diff - up to r2618: * Print an error i...
glen
glen at pld-linux.org
Wed Sep 2 10:39:36 CEST 2009
Author: glen Date: Wed Sep 2 08:39:36 2009 GMT
Module: packages Tag: HEAD
---- Log message:
- up to r2618:
* Print an error if you use too many captures in a regex pattern (fixes #2059)
---- Files affected:
packages/lighttpd:
lighttpd-branch.diff (1.55 -> 1.56)
---- Diffs:
================================================================
Index: packages/lighttpd/lighttpd-branch.diff
diff -u packages/lighttpd/lighttpd-branch.diff:1.55 packages/lighttpd/lighttpd-branch.diff:1.56
--- packages/lighttpd/lighttpd-branch.diff:1.55 Fri Aug 28 16:03:52 2009
+++ packages/lighttpd/lighttpd-branch.diff Wed Sep 2 10:39:31 2009
@@ -6,8 +6,8 @@
===================================================================
Index: src/configfile-glue.c
===================================================================
---- src/configfile-glue.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/configfile-glue.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/configfile-glue.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/configfile-glue.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -103,7 +103,6 @@
if (e != ds->value->ptr && !*e && l >=0 && l <= 65535) {
*((unsigned short *)(cv[i].destination)) = l;
@@ -60,8 +60,8 @@
data_string *ds = (data_string *)du;
Index: src/mod_cgi.c
===================================================================
---- src/mod_cgi.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/mod_cgi.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/mod_cgi.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/mod_cgi.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -56,6 +56,7 @@
typedef struct {
@@ -139,8 +139,8 @@
Index: src/network_write.c
===================================================================
---- src/network_write.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/network_write.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/network_write.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/network_write.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -46,15 +46,27 @@
toSend = c->mem->used - 1 - c->offset;
#ifdef __WIN32
@@ -251,8 +251,8 @@
Index: src/mod_secure_download.c
===================================================================
---- src/mod_secure_download.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/mod_secure_download.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/mod_secure_download.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/mod_secure_download.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -37,7 +37,7 @@
buffer *secret;
buffer *uri_prefix;
@@ -284,8 +284,8 @@
Index: src/base.h
===================================================================
---- src/base.h (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/base.h (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/base.h (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/base.h (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -84,6 +84,7 @@
typedef enum { T_CONFIG_UNSET,
T_CONFIG_STRING,
@@ -331,8 +331,8 @@
fdevents *ev, *ev_ins;
Index: src/mod_rewrite.c
===================================================================
---- src/mod_rewrite.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/mod_rewrite.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/mod_rewrite.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/mod_rewrite.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -176,7 +176,7 @@
data_unset *du;
@@ -373,8 +373,8 @@
buffer_append_string_len(con->request.uri, pattern+k, pattern[k] == pattern[k+1] ? 1 : 2);
Index: src/connections.c
===================================================================
---- src/connections.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/connections.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/connections.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/connections.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -782,13 +782,13 @@
CLEAN(request.pathinfo);
CLEAN(request.request);
@@ -416,9 +416,64 @@
break;
Index: src/network.c
===================================================================
---- src/network.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/network.c (.../branches/lighttpd-1.4.x) (revision 2613)
-@@ -167,6 +167,11 @@
+--- src/network.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/network.c (.../branches/lighttpd-1.4.x) (revision 2618)
+@@ -90,6 +90,7 @@
+
+ srv_socket = calloc(1, sizeof(*srv_socket));
+ srv_socket->fd = -1;
++ srv_socket->fde_ndx = -1;
+
+ srv_socket->srv_token = buffer_init();
+ buffer_copy_string_buffer(srv_socket->srv_token, host_token);
+@@ -103,7 +104,7 @@
+ if (NULL == (sp = strrchr(b->ptr, ':'))) {
+ log_error_write(srv, __FILE__, __LINE__, "sb", "value of $SERVER[\"socket\"] has to be \"ip:port\".", b);
+
+- return -1;
++ goto error_free_socket;
+ }
+
+ host = b->ptr;
+@@ -126,7 +127,7 @@
+ } else if (port == 0 || port > 65535) {
+ log_error_write(srv, __FILE__, __LINE__, "sd", "port out of range:", port);
+
+- return -1;
++ goto error_free_socket;
+ }
+
+ if (*host == '\0') host = NULL;
+@@ -138,12 +139,12 @@
+
+ if (-1 == (srv_socket->fd = socket(srv_socket->addr.plain.sa_family, SOCK_STREAM, 0))) {
+ log_error_write(srv, __FILE__, __LINE__, "ss", "socket failed:", strerror(errno));
+- return -1;
++ goto error_free_socket;
+ }
+ #else
+ log_error_write(srv, __FILE__, __LINE__, "s",
+ "ERROR: Unix Domain sockets are not supported.");
+- return -1;
++ goto error_free_socket;
+ #endif
+ }
+
+@@ -153,7 +154,7 @@
+
+ if (-1 == (srv_socket->fd = socket(srv_socket->addr.plain.sa_family, SOCK_STREAM, IPPROTO_TCP))) {
+ log_error_write(srv, __FILE__, __LINE__, "ss", "socket failed:", strerror(errno));
+- return -1;
++ goto error_free_socket;
+ }
+ srv_socket->use_ipv6 = 1;
+ }
+@@ -163,17 +164,22 @@
+ srv_socket->addr.plain.sa_family = AF_INET;
+ if (-1 == (srv_socket->fd = socket(srv_socket->addr.plain.sa_family, SOCK_STREAM, IPPROTO_TCP))) {
+ log_error_write(srv, __FILE__, __LINE__, "ss", "socket failed:", strerror(errno));
+- return -1;
++ goto error_free_socket;
}
}
@@ -430,16 +485,199 @@
/* */
srv->cur_fds = srv_socket->fd;
-@@ -280,8 +285,6 @@
+ val = 1;
+ if (setsockopt(srv_socket->fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)) < 0) {
+ log_error_write(srv, __FILE__, __LINE__, "ss", "socketsockopt failed:", strerror(errno));
+- return -1;
++ goto error_free_socket;
+ }
+
+ switch(srv_socket->addr.plain.sa_family) {
+@@ -198,7 +204,7 @@
+ "sssss", "getaddrinfo failed: ",
+ gai_strerror(r), "'", host, "'");
+
+- return -1;
++ goto error_free_socket;
+ }
+
+ memcpy(&(srv_socket->addr), res->ai_addr, res->ai_addrlen);
+@@ -220,17 +226,17 @@
+ log_error_write(srv, __FILE__, __LINE__,
+ "sds", "gethostbyname failed: ",
+ h_errno, host);
+- return -1;
++ goto error_free_socket;
+ }
+
+ if (he->h_addrtype != AF_INET) {
+ log_error_write(srv, __FILE__, __LINE__, "sd", "addr-type != AF_INET: ", he->h_addrtype);
+- return -1;
++ goto error_free_socket;
+ }
+
+ if (he->h_length != sizeof(struct in_addr)) {
+ log_error_write(srv, __FILE__, __LINE__, "sd", "addr-length != sizeof(in_addr): ", he->h_length);
+- return -1;
++ goto error_free_socket;
+ }
+
+ memcpy(&(srv_socket->addr.ipv4.sin_addr.s_addr), he->h_addr_list[0], he->h_length);
+@@ -260,7 +266,7 @@
+ host);
+
+
+- return -1;
++ goto error_free_socket;
+ }
+
+ /* connect failed */
+@@ -275,14 +281,12 @@
+ "testing socket failed:",
+ host, strerror(errno));
+
+- return -1;
++ goto error_free_socket;
+ }
break;
default:
- addr_len = 0;
-
- return -1;
+- return -1;
++ goto error_free_socket;
+ }
+
+ if (0 != bind(srv_socket->fd, (struct sockaddr *) &(srv_socket->addr), addr_len)) {
+@@ -298,12 +302,12 @@
+ host, port, strerror(errno));
+ break;
+ }
+- return -1;
++ goto error_free_socket;
+ }
+
+ if (-1 == listen(srv_socket->fd, 128 * 8)) {
+ log_error_write(srv, __FILE__, __LINE__, "ss", "listen failed: ", strerror(errno));
+- return -1;
++ goto error_free_socket;
+ }
+
+ if (s->is_ssl) {
+@@ -316,14 +320,14 @@
+ if (0 == RAND_status()) {
+ log_error_write(srv, __FILE__, __LINE__, "ss", "SSL:",
+ "not enough entropy in the pool");
+- return -1;
++ goto error_free_socket;
+ }
+ }
+
+ if (NULL == (s->ssl_ctx = SSL_CTX_new(SSLv23_server_method()))) {
+ log_error_write(srv, __FILE__, __LINE__, "ss", "SSL:",
+ ERR_error_string(ERR_get_error(), NULL));
+- return -1;
++ goto error_free_socket;
+ }
+
+ if (!s->ssl_use_sslv2) {
+@@ -331,7 +335,7 @@
+ if (SSL_OP_NO_SSLv2 != SSL_CTX_set_options(s->ssl_ctx, SSL_OP_NO_SSLv2)) {
+ log_error_write(srv, __FILE__, __LINE__, "ss", "SSL:",
+ ERR_error_string(ERR_get_error(), NULL));
+- return -1;
++ goto error_free_socket;
+ }
+ }
+
+@@ -340,33 +344,33 @@
+ if (SSL_CTX_set_cipher_list(s->ssl_ctx, s->ssl_cipher_list->ptr) != 1) {
+ log_error_write(srv, __FILE__, __LINE__, "ss", "SSL:",
+ ERR_error_string(ERR_get_error(), NULL));
+- return -1;
++ goto error_free_socket;
+ }
+ }
+
+ if (buffer_is_empty(s->ssl_pemfile)) {
+ log_error_write(srv, __FILE__, __LINE__, "s", "ssl.pemfile has to be set");
+- return -1;
++ goto error_free_socket;
+ }
+
+ if (!buffer_is_empty(s->ssl_ca_file)) {
+ if (1 != SSL_CTX_load_verify_locations(s->ssl_ctx, s->ssl_ca_file->ptr, NULL)) {
+ log_error_write(srv, __FILE__, __LINE__, "ssb", "SSL:",
+ ERR_error_string(ERR_get_error(), NULL), s->ssl_ca_file);
+- return -1;
++ goto error_free_socket;
+ }
+ }
+
+ if (SSL_CTX_use_certificate_file(s->ssl_ctx, s->ssl_pemfile->ptr, SSL_FILETYPE_PEM) < 0) {
+ log_error_write(srv, __FILE__, __LINE__, "ssb", "SSL:",
+ ERR_error_string(ERR_get_error(), NULL), s->ssl_pemfile);
+- return -1;
++ goto error_free_socket;
+ }
+
+ if (SSL_CTX_use_PrivateKey_file (s->ssl_ctx, s->ssl_pemfile->ptr, SSL_FILETYPE_PEM) < 0) {
+ log_error_write(srv, __FILE__, __LINE__, "ssb", "SSL:",
+ ERR_error_string(ERR_get_error(), NULL), s->ssl_pemfile);
+- return -1;
++ goto error_free_socket;
+ }
+
+ if (SSL_CTX_check_private_key(s->ssl_ctx) != 1) {
+@@ -374,7 +378,7 @@
+ "Private key does not match the certificate public key, reason:",
+ ERR_error_string(ERR_get_error(), NULL),
+ s->ssl_pemfile);
+- return -1;
++ goto error_free_socket;
+ }
+ SSL_CTX_set_default_read_ahead(s->ssl_ctx, 1);
+ SSL_CTX_set_mode(s->ssl_ctx, SSL_CTX_get_mode(s->ssl_ctx) | SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
+@@ -390,7 +394,7 @@
+ log_error_write(srv, __FILE__, __LINE__, "ss", "SSL:",
+ "ssl requested but openssl support is not compiled in");
+
+- return -1;
++ goto error_free_socket;
+ #endif
+ #ifdef TCP_DEFER_ACCEPT
+ } else if (s->defer_accept) {
+@@ -414,7 +418,6 @@
}
-@@ -567,12 +570,8 @@
+ srv_socket->is_ssl = s->is_ssl;
+- srv_socket->fde_ndx = -1;
+
+ if (srv->srv_sockets.size == 0) {
+ srv->srv_sockets.size = 4;
+@@ -430,6 +433,21 @@
+ buffer_free(b);
+
+ return 0;
++
++error_free_socket:
++ if (srv_socket->fd != -1) {
++ /* check if server fd are already registered */
++ if (srv_socket->fde_ndx != -1) {
++ fdevent_event_del(srv->ev, &(srv_socket->fde_ndx), srv_socket->fd);
++ fdevent_unregister(srv->ev, srv_socket->fd);
++ }
++
++ close(srv_socket->fd);
++ }
++ buffer_free(srv_socket->srv_token);
++ free(srv_socket);
++
++ return -1;
+ }
+
+ int network_close(server *srv) {
+@@ -567,12 +585,8 @@
/* not our stage */
if (COMP_SERVER_SOCKET != dc->comp) continue;
@@ -455,8 +693,8 @@
for (j = 0; j < srv->srv_sockets.used; j++) {
Index: src/configfile.c
===================================================================
---- src/configfile.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/configfile.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/configfile.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/configfile.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -42,12 +42,12 @@
{ "server.event-handler", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_SERVER }, /* 10 */
@@ -529,8 +767,8 @@
#endif
Index: src/mod_evhost.c
===================================================================
---- src/mod_evhost.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/mod_evhost.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/mod_evhost.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/mod_evhost.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -213,7 +213,7 @@
if (colon != ptr) {
ds = data_string_init();
@@ -555,8 +793,8 @@
if (ds->value->used) {
Index: src/splaytree.c
===================================================================
---- src/splaytree.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/splaytree.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/splaytree.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/splaytree.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -61,12 +61,11 @@
* size fields are maintained */
splay_tree * splaytree_splay (splay_tree *t, int i) {
@@ -573,8 +811,8 @@
for (;;) {
Index: src/lemon.c
===================================================================
---- src/lemon.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/lemon.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/lemon.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/lemon.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -39,6 +39,12 @@
# endif
#endif
@@ -623,7 +861,23 @@
if( argv[0] ) fprintf(err,"%s",argv[0]);
spcnt = strlen(argv[0]) + 1;
for(i=1; i<n && argv[i]; i++){
-@@ -2913,7 +2918,7 @@
+@@ -2336,6 +2341,7 @@
+ if( filebuf==0 ){
+ ErrorMsg(ps.filename,0,"Can't allocate %d of memory to hold this file.",
+ filesize+1);
++ fclose(fp);
+ gp->errorcnt++;
+ return;
+ }
+@@ -2343,6 +2349,7 @@
+ ErrorMsg(ps.filename,0,"Can't read in all %d bytes of this file.",
+ filesize);
+ free(filebuf);
++ fclose(fp);
+ gp->errorcnt++;
+ return;
+ }
+@@ -2913,7 +2920,7 @@
}else if( sp->destructor ){
cp = sp->destructor;
fprintf(out,"#line %d \"%s\"\n{",sp->destructorln,lemp->filename);
@@ -632,7 +886,7 @@
cp = lemp->vardest;
if( cp==0 ) return;
fprintf(out,"#line %d \"%s\"\n{",lemp->vardestln,lemp->filename);
-@@ -3042,7 +3047,7 @@
+@@ -3042,7 +3049,7 @@
int *plineno; /* Pointer to the line number */
int mhflag; /* True if generating makeheaders output */
{
@@ -643,8 +897,8 @@
int maxdtlength; /* Maximum length of any ".datatype" field. */
Index: src/mod_scgi.c
===================================================================
---- src/mod_scgi.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/mod_scgi.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/mod_scgi.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/mod_scgi.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -331,8 +331,21 @@
int scgi_proclist_sort_down(server *srv, scgi_extension_host *host, scgi_proc *proc);
@@ -804,8 +1058,8 @@
Index: src/mod_mysql_vhost.c
===================================================================
---- src/mod_mysql_vhost.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/mod_mysql_vhost.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/mod_mysql_vhost.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/mod_mysql_vhost.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -259,8 +259,14 @@
#define FOO(x) (s->x->used ? s->x->ptr : NULL)
@@ -885,8 +1139,8 @@
}
Index: src/request.c
===================================================================
---- src/request.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/request.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/request.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/request.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -111,7 +111,7 @@
/* check the first character at right of the dot */
@@ -917,8 +1171,8 @@
con->request.request);
Index: src/network_backends.h
===================================================================
---- src/network_backends.h (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/network_backends.h (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/network_backends.h (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/network_backends.h (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -45,6 +45,11 @@
#include "base.h"
@@ -933,8 +1187,8 @@
int network_write_chunkqueue_writev(server *srv, connection *con, int fd, chunkqueue *cq);
Index: src/mod_rrdtool.c
===================================================================
---- src/mod_rrdtool.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/mod_rrdtool.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/mod_rrdtool.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/mod_rrdtool.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -139,10 +139,8 @@
args[i++] = p->conf.path_rrdtool_bin->ptr;
@@ -958,8 +1212,8 @@
Index: src/stat_cache.c
===================================================================
---- src/stat_cache.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/stat_cache.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/stat_cache.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/stat_cache.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -503,12 +503,10 @@
}
@@ -978,8 +1232,8 @@
Index: src/mod_proxy.c
===================================================================
---- src/mod_proxy.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/mod_proxy.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/mod_proxy.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/mod_proxy.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -756,12 +756,15 @@
switch(hctx->state) {
@@ -1069,8 +1323,8 @@
Index: src/Makefile.am
===================================================================
---- src/Makefile.am (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/Makefile.am (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/Makefile.am (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/Makefile.am (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -13,14 +13,14 @@
versionstamp:
@test -f versionstamp.h || touch versionstamp.h; \
@@ -1091,8 +1345,8 @@
echo "#define REPO_VERSION \"-devel-$$REVISION\"" > versionstamp.h.tmp; \
Index: src/mod_expire.c
===================================================================
---- src/mod_expire.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/mod_expire.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/mod_expire.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/mod_expire.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -342,7 +342,7 @@
buffer_copy_string_len(p->expire_tstmp, CONST_STR_LEN("max-age="));
buffer_append_long(p->expire_tstmp, expires - srv->cur_ts); /* as expires >= srv->cur_ts the difference is >= 0 */
@@ -1104,8 +1358,8 @@
}
Index: src/http_auth.c
===================================================================
---- src/http_auth.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/http_auth.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/http_auth.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/http_auth.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -918,15 +918,15 @@
char a1[256];
char a2[256];
@@ -1149,8 +1403,8 @@
log_error_write(srv, __FILE__, __LINE__, "s",
Index: src/mod_redirect.c
===================================================================
---- src/mod_redirect.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/mod_redirect.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/mod_redirect.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/mod_redirect.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -203,7 +203,7 @@
}
} else {
@@ -1182,8 +1436,8 @@
buffer_append_string_len(p->location, pattern+k, pattern[k] == pattern[k+1] ? 1 : 2);
Index: src/mod_webdav.c
===================================================================
---- src/mod_webdav.c (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/mod_webdav.c (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/mod_webdav.c (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/mod_webdav.c (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -1096,6 +1096,7 @@
}
#endif
@@ -1203,8 +1457,8 @@
*
Index: src/configparser.y
===================================================================
---- src/configparser.y (.../tags/lighttpd-1.4.23) (revision 2613)
-+++ src/configparser.y (.../branches/lighttpd-1.4.x) (revision 2613)
+--- src/configparser.y (.../tags/lighttpd-1.4.23) (revision 2618)
++++ src/configparser.y (.../branches/lighttpd-1.4.x) (revision 2618)
@@ -72,7 +72,7 @@
op1->free(op1);
return (data_unset *)ds;
@@ -1222,10 +1476,34 @@
}
else {
buffer_copy_string_buffer(du->key, A);
+@@ -470,7 +469,7 @@
+ case CONFIG_COND_MATCH: {
+ #ifdef HAVE_PCRE_H
+ const char *errptr;
+- int erroff;
++ int erroff, captures;
+
+ if (NULL == (dc->regex =
+ pcre_compile(rvalue->ptr, 0, &errptr, &erroff, NULL))) {
+@@ -487,6 +486,14 @@
+ fprintf(stderr, "studying regex failed: %s -> %s\n",
+ rvalue->ptr, errptr);
+ ctx->ok = 0;
++ } else if (0 != (pcre_fullinfo(dc->regex, dc->regex_study, PCRE_INFO_CAPTURECOUNT, &captures))) {
++ fprintf(stderr, "getting capture count for regex failed: %s\n",
++ rvalue->ptr);
++ ctx->ok = 0;
++ } else if (captures > 9) {
++ fprintf(stderr, "Too many captures in regex, use (?:...) instead of (...): %s\n",
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/lighttpd/lighttpd-branch.diff?r1=1.55&r2=1.56&f=u
More information about the pld-cvs-commit
mailing list