From cb7b2028dc03c628aa0a1a5130ca41421ddebcb2 Mon Sep 17 00:00:00 2001 From: NickSampanis Date: Fri, 17 Oct 2014 17:47:28 +0300 Subject: [PATCH] Fix ignored dn_expand error --- plug-ins/mdns_spoof/mdns_spoof.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plug-ins/mdns_spoof/mdns_spoof.c b/plug-ins/mdns_spoof/mdns_spoof.c index a9cd96846..190fb685b 100644 --- a/plug-ins/mdns_spoof/mdns_spoof.c +++ b/plug-ins/mdns_spoof/mdns_spoof.c @@ -309,7 +309,8 @@ static int parse_line (const char *str, int line, int *type_p, char **ip_p, u_in for (x = 0; x < mdns->questions; x++) { name_len = dn_expand((u_char*)mdns, end, q, name, sizeof(name)); - + if (name_len == -1) + return; q = data + name_len; if (q >= end || name_len == 0)