diff mbox

[2/2] Fixed format overflow warnings in mountd and nfsd

Message ID 20180531155525.60495-3-steved@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Steve Dickson May 31, 2018, 3:55 p.m. UTC
From: gabriele balducci <balducci@units.it>

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 utils/mountd/mountd.c | 2 +-
 utils/nfsd/nfsd.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c
index 4c68702..086c39b 100644
--- a/utils/mountd/mountd.c
+++ b/utils/mountd/mountd.c
@@ -702,7 +702,7 @@  main(int argc, char **argv)
 	else
 		NFSCTL_TCPUNSET(_rpcprotobits);
 	for (vers = 2; vers <= 4; vers++) {
-		char tag[10];
+		char tag[20];
 		sprintf(tag, "vers%d", vers);
 		if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(nfs_version, vers)))
 			NFSCTL_VERSET(nfs_version, vers);
diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c
index 2303a5d..f048631 100644
--- a/utils/nfsd/nfsd.c
+++ b/utils/nfsd/nfsd.c
@@ -98,7 +98,7 @@  main(int argc, char **argv)
 	else
 		NFSCTL_TCPUNSET(protobits);
 	for (i = 2; i <= 4; i++) {
-		char tag[10];
+		char tag[20];
 		sprintf(tag, "vers%d", i);
 		if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(versbits, i)))
 			NFSCTL_VERSET(versbits, i);