]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Apply ITS#148 fix for "ud find seg fault", NULL in printf
authorKurt Zeilenga <kurt@openldap.org>
Wed, 28 Apr 1999 20:04:37 +0000 (20:04 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 28 Apr 1999 20:04:37 +0000 (20:04 +0000)
clients/ud/main.c

index 9480c63b7dc2f36735d32166fe3cae7abc75638b..eb435cba61d8fa659a4966b5922cbfbdde50d53c 100644 (file)
@@ -225,9 +225,12 @@ do_commands( void )
                                parse_answer(mp);
                                print_an_entry();
                                ldap_msgfree(mp);
-                       }
-                       else
+
+                       } else if (cp != NULL) {
                                printf(" Could not find \"%s\".\n", cp);
+                       } else {
+                               printf(" Could not complete find.\n");
+                       }
                }
 #ifdef UOFM
                else if (iscom("vedit") && isatty( 1 )) {