Blame SOURCES/nfs-utils-2.5.4-covscan-return-value.patch
|
|
16940a |
diff -up nfs-utils-2.5.4/support/export/client.c.orig nfs-utils-2.5.4/support/export/client.c
|
|
|
16940a |
--- nfs-utils-2.5.4/support/export/client.c.orig 2021-06-10 14:07:47.000000000 -0400
|
|
|
16940a |
+++ nfs-utils-2.5.4/support/export/client.c 2023-01-26 11:26:00.279342412 -0500
|
|
|
16940a |
@@ -699,6 +699,9 @@ check_netgroup(const nfs_client *clp, co
|
|
|
16940a |
|
|
|
16940a |
/* check whether the IP itself is in the netgroup */
|
|
|
16940a |
ip = calloc(INET6_ADDRSTRLEN, 1);
|
|
|
16940a |
+ if (ip == NULL)
|
|
|
16940a |
+ goto out;
|
|
|
16940a |
+
|
|
|
16940a |
if (inet_ntop(ai->ai_family, &(((struct sockaddr_in *)ai->ai_addr)->sin_addr), ip, INET6_ADDRSTRLEN) == ip) {
|
|
|
16940a |
if (innetgr(netgroup, ip, NULL, NULL)) {
|
|
|
16940a |
free(hname);
|
|
|
16940a |
diff -up nfs-utils-2.5.4/tools/nfsrahead/main.c.orig nfs-utils-2.5.4/tools/nfsrahead/main.c
|
|
|
16940a |
--- nfs-utils-2.5.4/tools/nfsrahead/main.c.orig 2023-01-26 11:23:48.941618287 -0500
|
|
|
16940a |
+++ nfs-utils-2.5.4/tools/nfsrahead/main.c 2023-01-26 11:26:00.279342412 -0500
|
|
|
16940a |
@@ -167,7 +167,7 @@ int main(int argc, char **argv)
|
|
|
16940a |
if ((ret = get_device_info(argv[optind], &device)) == 0)
|
|
|
16940a |
break;
|
|
|
16940a |
|
|
|
16940a |
- if (ret != 0) {
|
|
|
16940a |
+ if (ret != 0 || device.fstype == NULL) {
|
|
|
16940a |
xlog(D_GENERAL, "unable to find device %s\n", argv[optind]);
|
|
|
16940a |
goto out;
|
|
|
16940a |
}
|