yp-tools/yp-tools-4.2.3-yppasswd.patch

20 lines
533 B
Diff

author Filip Januš (fjanus@redhat.com)
date 29. 10. 2019
diff -ur yp-tools-4.2.3/src/yppasswd.c yp-tools-master/src/yppasswd.c
--- yp-tools-4.2.3/src/yppasswd.c 2018-03-27 15:47:48.000000000 +0200
+++ yp-tools-master/src/yppasswd.c 2019-10-29 12:00:29.000000000 +0100
@@ -281,6 +281,11 @@
CLIENT *clnt;
clnt = clnt_create (master, YPPROG, YPVERS, "udp");
+
+ /* clnt_create can return NULL in some cases */
+ if (clnt == NULL)
+ return NULL;
+
clnt->cl_auth = authunix_create_default ();
if (name == NULL)