From afff4e17702dec66b3528cb2f4bc9e57a4ef4563 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Fri, 22 Dec 2006 14:24:52 +0000 Subject: [PATCH] Skip empty filter files in pcrs_filter_response, but don't ignore the ones that come afterwards. Fixes parts of BR 1619208. --- filters.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/filters.c b/filters.c index 1300a7ea..831fcb0f 100644 --- a/filters.c +++ b/filters.c @@ -1,4 +1,4 @@ -const char filters_rcs[] = "$Id: filters.c,v 1.69 2006/12/08 12:39:13 fabiankeil Exp $"; +const char filters_rcs[] = "$Id: filters.c,v 1.70 2006/12/09 13:33:15 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/filters.c,v $ @@ -40,6 +40,10 @@ const char filters_rcs[] = "$Id: filters.c,v 1.69 2006/12/08 12:39:13 fabiankeil * * Revisions : * $Log: filters.c,v $ + * Revision 1.70 2006/12/09 13:33:15 fabiankeil + * Added some sanity checks for get_last_url(). + * Fixed possible segfault caused by my last commit. + * * Revision 1.69 2006/12/08 12:39:13 fabiankeil * Let get_last_url() catch https URLs as well. * @@ -1694,7 +1698,18 @@ char *pcrs_filter_response(struct client_state *csp) { fl = csp->rlist[i]; if ((NULL == fl) || (NULL == fl->f)) - break; + { + /* + * Either there are no filter files + * left, or this filter file just + * contains no valid filters. + * + * Continue to be sure we don't miss + * valid filter files that are chained + * after empty or invalid ones. + */ + continue; + } /* * For all applying +filter actions, look if a filter by that * name exists and if yes, execute it's pcrs_joblist on the -- 2.39.2