about summary refs log tree commit diff
path: root/resolv/res_comp.c
diff options
context:
space:
mode:
Diffstat (limited to 'resolv/res_comp.c')
-rw-r--r--resolv/res_comp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/resolv/res_comp.c b/resolv/res_comp.c
index 76f7cea5c5..d96fe6e432 100644
--- a/resolv/res_comp.c
+++ b/resolv/res_comp.c
@@ -394,8 +394,12 @@ int
 res_ownok(dn)
 	const char *dn;
 {
-	if (asterchar(dn[0]) && periodchar(dn[1]))
-		dn += 2;
+	if (asterchar(dn[0])) {
+		if (periodchar(dn[1]))
+			return (res_hnok(dn+2));
+		if (dn[1] == '\0')
+			return (1);
+	}
 	return (res_hnok(dn));
 }