aboutsummaryrefslogtreecommitdiffstats
path: root/src/printf.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-06-23 19:05:58 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-06-23 19:05:58 +0400
commit5022c0333ffd8ce5eca3dc9e2679b612e2c9ce99 (patch)
tree4b7fd05c9f01700ea372fb941b87312fceece513 /src/printf.c
parentde94e18f57a0dccbab76efb3d574c0485a9e3700 (diff)
downloadrspamd-5022c0333ffd8ce5eca3dc9e2679b612e2c9ce99.tar.gz
rspamd-5022c0333ffd8ce5eca3dc9e2679b612e2c9ce99.zip
* Fixes to fuzzy hashing logic, skip urls while estimating fuzzy hash
Fix tags stripping. Fix phishing checks (ignore img tags).
Diffstat (limited to 'src/printf.c')
-rw-r--r--src/printf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/printf.c b/src/printf.c
index a8bf0fdb1..4155f9478 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -216,6 +216,7 @@ rspamd_vsnprintf (gchar *buf, glong max, const gchar *fmt, va_list args)
guint64 ui64;
guint width, sign, hex, max_width, frac_width, i;
f_str_t *v;
+ GString *gs;
if (max <= 0) {
return buf;
@@ -312,6 +313,15 @@ rspamd_vsnprintf (gchar *buf, glong max, const gchar *fmt, va_list args)
continue;
+ case 'v':
+ gs = va_arg (args, GString *);
+ len = gs->len;
+ len = (buf + len < last) ? len : (size_t) (last - buf);
+
+ buf = ((gchar *)memcpy (buf, gs->str, len)) + len;
+ fmt++;
+ break;
+
case 's':
p = va_arg(args, gchar *);
if (p == NULL) {