]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
ldns-notify TSIG option argument checking
authorWillem Toorop <willem@NLnetLabs.nl>
Wed, 22 Aug 2012 12:31:38 +0000 (12:31 +0000)
committerWillem Toorop <willem@NLnetLabs.nl>
Wed, 22 Aug 2012 12:31:38 +0000 (12:31 +0000)
Changelog
examples/ldns-notify.c

index e5a8ab533ff244911262589109b9b71354b5bdeb..a8fe7fa6f734e3e82455ec4b8678e2d792cd0b0f 100644 (file)
--- 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.
index 70150d598d56dae3a877238b1613df5d077156b4..50da6e606af8385057a581a6b566d00f08c7a0bf 100644 (file)
@@ -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,