Subject: | DiG 9.12.0-pre-alpha - Dig INSIST on multiple +client= options |
Date: | Mon, 13 Feb 2017 13:40:57 +0000 |
To: | bind-bugs@isc.org |
From: | "Yuri Schaeffer" <yuri@nlnetlabs.nl> |
Bug Report from www.isc.org:
Name: Yuri Schaeffer
Email: yuri@nlnetlabs.nl
Software Version: DiG 9.12.0-pre-alpha
OS: Linux
Subject:Dig INSIST on multiple +client= options
Bug Detail
===========
When providing multiple +client options to dig, dig will assert when cleaning up memory:
$ dig +client=0/0 +client=0/0
A possible patch on top of git/master, to reject 2nd client option:
index 28f7eda59f..40a28f83bd 100644
--- a/bin/dig/dighost.c
+++ b/bin/dig/dighost.c
@@ -1096,6 +1096,9 @@ parse_netprefix(isc_sockaddr_t **sap, const char *value) {
isc_boolean_t prefix_parsed = ISC_FALSE;
char buf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:XXX.XXX.XXX.XXX/128")];
+ if (*sap != NULL)
+ return ISC_R_FAILURE;
+
if (strlcpy(buf, value, sizeof(buf)) >= sizeof(buf))
fatal("invalid prefix '%s'\n", value);
Regards,
Yuri
---
This email was received through isc.org Bug Submission Form