X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=loaders.c;h=51282f490c4b47d7adf1589904876c28fdd7bf36;hb=e21e921820c7b16f2594d269749e11ef785e179f;hp=23463350aea0f0e8b6b6a935e54d6ffbfb01f550;hpb=4ab23810e60abf0bdc8bad5fb2024183930a072d;p=privoxy.git diff --git a/loaders.c b/loaders.c index 23463350..51282f49 100644 --- a/loaders.c +++ b/loaders.c @@ -1,4 +1,4 @@ -const char loaders_rcs[] = "$Id: loaders.c,v 1.52 2006/07/18 14:48:46 david__schmidt Exp $"; +const char loaders_rcs[] = "$Id: loaders.c,v 1.55 2006/09/07 10:25:39 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/loaders.c,v $ @@ -35,6 +35,21 @@ const char loaders_rcs[] = "$Id: loaders.c,v 1.52 2006/07/18 14:48:46 david__sch * * Revisions : * $Log: loaders.c,v $ + * Revision 1.55 2006/09/07 10:25:39 fabiankeil + * Fix typo. + * + * Revision 1.54 2006/09/07 10:22:20 fabiankeil + * If too many trusted referrers are used, + * print only one error message instead of logging + * every single trusted referrer above the arbitrary + * limit. + * + * Revision 1.53 2006/08/31 16:25:06 fabiankeil + * Work around a buffer overflow that caused Privoxy to + * segfault if too many trusted referrers were used. Good + * enough for now, but should be replaced with a real + * solution after the next release. + * * Revision 1.52 2006/07/18 14:48:46 david__schmidt * Reorganizing the repository: swapping out what was HEAD (the old 3.1 branch) * with what was really the latest development (the v_3_0_branch branch) @@ -1186,23 +1201,20 @@ int load_trustfile(struct client_state *csp) { *tl++ = b->url; } - else - { - /* - * FIXME: csp->config->trust_list is only needed - * to print the trusted referrers in Privoxy's blocking - * message. Not printing all of them is certainly better - * than writing them into memory that doesn't belong to us, - * but when Privoxy 3.0.4 is out, we should look for a real - * solution. - */ - log_error(LOG_LEVEL_ERROR, - "Too many trusted referrers, %s will not show up in the blocking message.", - *b->url); - } } } + if(trusted_referrers >= MAX_TRUSTED_REFERRERS) + { + /* + * FIXME: ... after Privoxy 3.0.4 is out. + */ + log_error(LOG_LEVEL_ERROR, "Too many trusted referrers. Current limit is %d, you are using %d.\n" + " Additional trusted referrers are treated like ordinary trusted URLs.\n" + " (You can increase this limit by changing MAX_TRUSTED_REFERRERS in project.h and recompiling).", + MAX_TRUSTED_REFERRERS, trusted_referrers); + } + *tl = NULL; fclose(fp);