diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-02-19 16:24:17 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-02-19 16:24:17 +0300 |
commit | e0593fbd3b6d9c39ad7891387fc6a0faa4eea29c (patch) | |
tree | 98aef416013adf9b2c0a586a1fde38f777b6e1e6 /src/dns.c | |
parent | fe1ab59efe607dfb6ee60f7bc590286909567cba (diff) | |
download | rspamd-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 * |