-const char loaders_rcs[] = "$Id: loaders.c,v 1.50.2.8 2006/01/30 15:16:25 david__schmidt Exp $";
+const char loaders_rcs[] = "$Id: loaders.c,v 1.52 2006/07/18 14:48:46 david__schmidt Exp $";
/*********************************************************************
*
- * File : $Source: /cvsroot/ijbswa/current/Attic/loaders.c,v $
+ * File : $Source: /cvsroot/ijbswa/current/loaders.c,v $
*
* Purpose : Functions to load and unload the various
* configuration files. Also contains code to manage
*
* Revisions :
* $Log: loaders.c,v $
+ * 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)
+ *
* Revision 1.50.2.8 2006/01/30 15:16:25 david__schmidt
* Remove a little residual debugging info
*
int reject, trusted;
struct file_list *fs;
unsigned long linenum = 0;
+ int trusted_referrers = 0;
if (!check_file_changed(current_trustfile, csp->config->trustfile, &fs))
{
*/
if (trusted)
{
- *tl++ = b->url;
- /* FIXME BUFFER OVERFLOW if >=64 entries */
+ if(++trusted_referrers < MAX_TRUSTED_REFERRERS)
+ {
+ *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);
+ }
}
}
#ifndef PROJECT_H_INCLUDED
#define PROJECT_H_INCLUDED
/** Version string. */
-#define PROJECT_H_VERSION "$Id: project.h,v 1.76 2006/08/14 08:25:19 fabiankeil Exp $"
+#define PROJECT_H_VERSION "$Id: project.h,v 1.77 2006/08/21 12:50:51 david__schmidt Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/project.h,v $
*
* Revisions :
* $Log: project.h,v $
+ * Revision 1.77 2006/08/21 12:50:51 david__schmidt
+ * Formatting cleanup
+ *
* Revision 1.76 2006/08/14 08:25:19 fabiankeil
* Split filter-headers{} into filter-client-headers{}
* and filter-server-headers{}.
struct block_spec *next; /**< Next entry in linked list */
};
+/**
+ * Arbitrary limit for the number of trusted referrers
+ * Privoxy can print in its blocking message.
+ */
+#define MAX_TRUSTED_REFERRERS 64
+
#endif /* def FEATURE_TRUST */
struct list trust_info[1];
/** FIXME: DOCME: Document this. */
- struct url_spec *trust_list[64];
+ struct url_spec *trust_list[MAX_TRUSTED_REFERRERS];
#endif /* def FEATURE_TRUST */