From: Willem Toorop Date: Wed, 22 Aug 2012 12:31:38 +0000 (+0000) Subject: ldns-notify TSIG option argument checking X-Git-Tag: release-1.6.14rc1~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64e81c514fd8d10da628c610b0b7d44811bc1ec7;p=thirdparty%2Fldns.git ldns-notify TSIG option argument checking --- diff --git a/Changelog b/Changelog index e5a8ab53..a8fe7fa6 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 1.6.14 + * ldns-notify TSIG option argument checking * Let ldns_resolver_nameservers_randomize keep nameservers and rtt's in sync. * Let ldns_pkt_push_rr now return false on (memory) errors. diff --git a/examples/ldns-notify.c b/examples/ldns-notify.c index 70150d59..50da6e60 100644 --- a/examples/ldns-notify.c +++ b/examples/ldns-notify.c @@ -204,6 +204,11 @@ main(int argc, char **argv) tsig_cred.algorithm = (char*)"hmac-md5.sig-alg.reg.int."; tsig_cred.keyname = optarg; tsig_cred.keydata = strchr(optarg, ':'); + if (tsig_cred.keydata == NULL) { + printf("TSIG argument is not in form " + "key:data: %s\n", optarg); + exit(1); + } *tsig_cred.keydata = '\0'; tsig_cred.keydata++; printf("Sign with %s : %s\n", tsig_cred.keyname,