aboutsummaryrefslogtreecommitdiffstats
path: root/src/dns.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-02-19 16:24:17 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-02-19 16:24:17 +0300
commite0593fbd3b6d9c39ad7891387fc6a0faa4eea29c (patch)
tree98aef416013adf9b2c0a586a1fde38f777b6e1e6 /src/dns.c
parentfe1ab59efe607dfb6ee60f7bc590286909567cba (diff)
downloadrspamd-e0593fbd3b6d9c39ad7891387fc6a0faa4eea29c.tar.gz
rspamd-e0593fbd3b6d9c39ad7891387fc6a0faa4eea29c.zip
* Add ability to save symbols that are inside composites with '-' flag.
Remove warnings from rspamc. Add new rules [1] Submitted by: Victor Ustugov [1]
Diffstat (limited to 'src/dns.c')
-rw-r--r--src/dns.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dns.c b/src/dns.c
index 82c796c1e..a87001260 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -874,6 +874,10 @@ dns_parse_rr (guint8 *in, union rspamd_reply_element *elt, guint8 **pos, struct
p += datalen;
}
else {
+ if (p - *pos > *remain - sizeof (guint16) * 3) {
+ msg_info ("stripped dns reply while reading SRV record");
+ return -1;
+ }
GET16 (elt->srv.priority);
GET16 (elt->srv.weight);
GET16 (elt->srv.port);
@@ -894,10 +898,6 @@ dns_parse_rr (guint8 *in, union rspamd_reply_element *elt, guint8 **pos, struct
return 1;
}
return 0;
-
-err:
- msg_info ("incomplete RR, only %d bytes remain, packet length %d", (gint)*remain, (gint)(*pos - in));
- return -1;
}
static struct rspamd_dns_reply *