summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2018-03-07 08:36:15 +0000
committerotto <otto@openbsd.org>2018-03-07 08:36:15 +0000
commit2d4b59096c3d58109eddf03920b3035416a11f00 (patch)
tree12ec1f268025e169cd70953994ff793170d9897e
parentReplace non-functioning checks for use of the usb memory block allocator in (diff)
downloadwireguard-openbsd-2d4b59096c3d58109eddf03920b3035416a11f00.tar.xz
wireguard-openbsd-2d4b59096c3d58109eddf03920b3035416a11f00.zip
check for expected record type
ok deraadt@ mestre@ gilles@
-rw-r--r--usr.sbin/smtpd/spfwalk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/smtpd/spfwalk.c b/usr.sbin/smtpd/spfwalk.c
index 46bff7086b9..6ba83faffd3 100644
--- a/usr.sbin/smtpd/spfwalk.c
+++ b/usr.sbin/smtpd/spfwalk.c
@@ -140,6 +140,8 @@ dispatch_txt(struct dns_rr *rr)
char *end;
ssize_t n;
+ if (rr->rr_type != T_TXT)
+ return;
n = parse_txt(rr->rr.other.rdata, rr->rr.other.rdlen, buf, sizeof(buf));
if (n == -1 || n == sizeof(buf))
return;