Linux NFS development
 help / color / mirror / Atom feed
* [PATCH 1/2] Covscan Scan: Wrong Check of Return Value
@ 2023-01-04 17:08 Steve Dickson
  2023-01-04 17:08 ` [PATCH 2/2] Covscan Scan: Fixed a couple CLANG_WARNINGs Steve Dickson
  2023-01-11 15:56 ` [PATCH 1/2] Covscan Scan: Wrong Check of Return Value Steve Dickson
  0 siblings, 2 replies; 4+ messages in thread
From: Steve Dickson @ 2023-01-04 17:08 UTC (permalink / raw)
  To: Linux NFS Mailing list

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2151966
Signed-off-by: Steve Dickson <steved@redhat.com>
---
 support/export/client.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/support/export/client.c b/support/export/client.c
index ea4f89d..79164fe 100644
--- a/support/export/client.c
+++ b/support/export/client.c
@@ -699,6 +699,9 @@ check_netgroup(const nfs_client *clp, const struct addrinfo *ai)
 
 	/* check whether the IP itself is in the netgroup */
 	ip = calloc(INET6_ADDRSTRLEN, 1);
+	if (ip == NULL)
+		goto out;
+
 	if (inet_ntop(ai->ai_family, &(((struct sockaddr_in *)ai->ai_addr)->sin_addr), ip, INET6_ADDRSTRLEN) == ip) {
 		if (innetgr(netgroup, ip, NULL, NULL)) {
 			free(hname);
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] Covscan Scan: Fixed a couple CLANG_WARNINGs
  2023-01-04 17:08 [PATCH 1/2] Covscan Scan: Wrong Check of Return Value Steve Dickson
@ 2023-01-04 17:08 ` Steve Dickson
  2023-01-11 15:57   ` Steve Dickson
  2023-01-11 15:56 ` [PATCH 1/2] Covscan Scan: Wrong Check of Return Value Steve Dickson
  1 sibling, 1 reply; 4+ messages in thread
From: Steve Dickson @ 2023-01-04 17:08 UTC (permalink / raw)
  To: Linux NFS Mailing list

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2151971
Signed-off-by: Steve Dickson <steved@redhat.com>
---
 tools/nfsrahead/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/nfsrahead/main.c b/tools/nfsrahead/main.c
index c83c6f7..8a11cf1 100644
--- a/tools/nfsrahead/main.c
+++ b/tools/nfsrahead/main.c
@@ -167,7 +167,7 @@ int main(int argc, char **argv)
 		if ((ret = get_device_info(argv[optind], &device)) == 0)
 			break;
 
-	if (ret != 0) {
+	if (ret != 0 || device.fstype == NULL) {
 		xlog(D_GENERAL, "unable to find device %s\n", argv[optind]);
 		goto out;
 	}
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] Covscan Scan: Wrong Check of Return Value
  2023-01-04 17:08 [PATCH 1/2] Covscan Scan: Wrong Check of Return Value Steve Dickson
  2023-01-04 17:08 ` [PATCH 2/2] Covscan Scan: Fixed a couple CLANG_WARNINGs Steve Dickson
@ 2023-01-11 15:56 ` Steve Dickson
  1 sibling, 0 replies; 4+ messages in thread
From: Steve Dickson @ 2023-01-11 15:56 UTC (permalink / raw)
  To: Linux NFS Mailing list



On 1/4/23 12:08 PM, Steve Dickson wrote:
> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2151966
> Signed-off-by: Steve Dickson <steved@redhat.com>
Committed... (tag: nfs-utils-2-6-3-rc6)

steved.
> ---
>   support/export/client.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/support/export/client.c b/support/export/client.c
> index ea4f89d..79164fe 100644
> --- a/support/export/client.c
> +++ b/support/export/client.c
> @@ -699,6 +699,9 @@ check_netgroup(const nfs_client *clp, const struct addrinfo *ai)
>   
>   	/* check whether the IP itself is in the netgroup */
>   	ip = calloc(INET6_ADDRSTRLEN, 1);
> +	if (ip == NULL)
> +		goto out;
> +
>   	if (inet_ntop(ai->ai_family, &(((struct sockaddr_in *)ai->ai_addr)->sin_addr), ip, INET6_ADDRSTRLEN) == ip) {
>   		if (innetgr(netgroup, ip, NULL, NULL)) {
>   			free(hname);


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] Covscan Scan: Fixed a couple CLANG_WARNINGs
  2023-01-04 17:08 ` [PATCH 2/2] Covscan Scan: Fixed a couple CLANG_WARNINGs Steve Dickson
@ 2023-01-11 15:57   ` Steve Dickson
  0 siblings, 0 replies; 4+ messages in thread
From: Steve Dickson @ 2023-01-11 15:57 UTC (permalink / raw)
  To: Linux NFS Mailing list



On 1/4/23 12:08 PM, Steve Dickson wrote:
> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2151971
> Signed-off-by: Steve Dickson <steved@redhat.com>
Committed... (tag: nfs-utils-2-6-3-rc6)

steved.
> ---
>   tools/nfsrahead/main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/nfsrahead/main.c b/tools/nfsrahead/main.c
> index c83c6f7..8a11cf1 100644
> --- a/tools/nfsrahead/main.c
> +++ b/tools/nfsrahead/main.c
> @@ -167,7 +167,7 @@ int main(int argc, char **argv)
>   		if ((ret = get_device_info(argv[optind], &device)) == 0)
>   			break;
>   
> -	if (ret != 0) {
> +	if (ret != 0 || device.fstype == NULL) {
>   		xlog(D_GENERAL, "unable to find device %s\n", argv[optind]);
>   		goto out;
>   	}


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-11 15:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-04 17:08 [PATCH 1/2] Covscan Scan: Wrong Check of Return Value Steve Dickson
2023-01-04 17:08 ` [PATCH 2/2] Covscan Scan: Fixed a couple CLANG_WARNINGs Steve Dickson
2023-01-11 15:57   ` Steve Dickson
2023-01-11 15:56 ` [PATCH 1/2] Covscan Scan: Wrong Check of Return Value Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox