There is a segmentation fault that occurs in ypbind when domainname is not set

Index: usr.sbin/ypbind/ypbind.c
===================================================================
RCS file: /cvs/src/usr.sbin/ypbind/ypbind.c,v
retrieving revision 1.76
diff -u -r1.76 ypbind.c
--- usr.sbin/ypbind/ypbind.c    17 Jul 2022 03:12:20 -0000      1.76
+++ usr.sbin/ypbind/ypbind.c    8 Nov 2022 11:04:29 -0000
@@ -345,7 +345,7 @@
        struct dirent *dent;
yp_get_default_domain(&domain);
-       if (domain[0] == '\0') {
+       if (domain == NULL) {
                fprintf(stderr, "domainname not set. Aborting.\n");
                exit(1);
        }

Reply via email to