aboutsummaryrefslogtreecommitdiffstats
path: root/src/dns.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-07-31 18:59:40 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-07-31 18:59:40 +0400
commit2a8b8ce671babd92cd60fbd70be9edf97cc20603 (patch)
treefe4c61979cd646544d5e2be1e89c8c8d9241e3af /src/dns.c
parent7c778294a9625ee4954f784763495e05af513510 (diff)
downloadrspamd-2a8b8ce671babd92cd60fbd70be9edf97cc20603.tar.gz
rspamd-2a8b8ce671babd92cd60fbd70be9edf97cc20603.zip
* Write symbols weights to rspamc output
* Improve logic of selecting rspamc version * Do not try to parse broken DNS replies * Add 'raw' flag to FROM_EXCESS_BASE64 rule (requested by citrin)
Diffstat (limited to 'src/dns.c')
-rw-r--r--src/dns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dns.c b/src/dns.c
index 5197aae66..c50b9f388 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -771,7 +771,7 @@ dns_parse_rr (guint8 *in, union rspamd_reply_element *elt, guint8 **pos, struct
msg_info ("bad RR name");
return -1;
}
- if (p - *pos >= *remain - sizeof (guint16) * 5) {
+ if (p - *pos >= *remain - sizeof (guint16) * 5 || *remain <= 0) {
msg_info ("stripped dns reply");
return -1;
}