diff --git a/clients/ud/main.c b/clients/ud/main.c index aebf89c4dc..4e2dac8adb 100644 --- a/clients/ud/main.c +++ b/clients/ud/main.c @@ -331,7 +331,7 @@ change_base( int type, char **base, char *s ) { register char *cp; /* utility pointers */ char **rdns; /* for parsing */ - char *output_string; /* for nice output */ + char *output_string = NULL; /* for nice output */ int num_picked; /* # of selected base */ int j; /* used with num_picked */ int i = 1; /* index into choices array */ diff --git a/clients/ud/util.c b/clients/ud/util.c index 16253263a4..6505f52ecc 100644 --- a/clients/ud/util.c +++ b/clients/ud/util.c @@ -44,6 +44,10 @@ printbase( char *lead, char *s ) if (debug & D_TRACE) printf("->printbase(%s, %s)\n", lead, s); #endif + if (lead == NULL) { + printf("root"); + return; + } if (s == NULL) { printf("%sroot\n", lead); return;