]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3657. [port] Some readline clones don't accept NULL pointers when
authorMark Andrews <marka@isc.org>
Wed, 25 Sep 2013 22:25:09 +0000 (08:25 +1000)
committerMark Andrews <marka@isc.org>
Wed, 25 Sep 2013 22:25:09 +0000 (08:25 +1000)
                        calling add_history. [RT #34842]

CHANGES
bin/dig/nslookup.c
bin/nsupdate/nsupdate.c

diff --git a/CHANGES b/CHANGES
index d350cf7b0a582553a5f3319847e63bdbee2d7f54..1fcfca1bed78296194cd41735e610e0c6247f90d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3657.  [port]          Some readline clones don't accept NULL pointers when
+                       calling add_history. [RT #34842]
+
 3656.  [bug]           Treat a all zero netmask as invalid when generating
                        the localnets acl. [RT #34687]
 
index d5ef50b7f6d130b7b58bd4361144120ef14f38a7..6c2f0a949983e1dd07add4b7bbf34bc13b5554fa 100644 (file)
@@ -776,7 +776,8 @@ get_next_command(void) {
        if (interactive) {
 #ifdef HAVE_READLINE
                ptr = readline("> ");
-               add_history(ptr);
+               if (ptr != NULL)
+                       add_history(ptr);
 #else
                fputs("> ", stderr);
                fflush(stderr);
index ddb7d446e28dfdc90c034fe0a241a08e9233a799..486c1023250baba74f57cdfcdda8d2b0b14d1b7a 100644 (file)
@@ -2035,7 +2035,8 @@ get_next_command(void) {
        if (interactive) {
 #ifdef HAVE_READLINE
                cmdline = readline("> ");
-               add_history(cmdline);
+               if (cmdline != NULL)
+                       add_history(cmdline);
 #else
                fprintf(stdout, "> ");
                fflush(stdout);