public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <steved@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: [PATCH] nfs-utils: Removed new error=format-overflow=2 errors
Date: Tue, 29 Jan 2019 15:34:59 -0500	[thread overview]
Message-ID: <20190129203459.38815-1-steved@redhat.com> (raw)

With the latest C99-compliant gcc printf, sprintf, etc
now only support up to 4k in buffer sizes. There were
only a couple places that had to change to not
violated this new restriction

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 utils/blkmapd/device-discovery.c | 2 +-
 utils/mount/error.c              | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/utils/blkmapd/device-discovery.c b/utils/blkmapd/device-discovery.c
index 3a202e0..2ce60f8 100644
--- a/utils/blkmapd/device-discovery.c
+++ b/utils/blkmapd/device-discovery.c
@@ -239,7 +239,7 @@ int bl_discover_devices(void)
 {
 	FILE *f;
 	int n;
-	char buf[PATH_MAX], devname[PATH_MAX], fulldevname[PATH_MAX+NAME_MAX];
+	char buf[PATH_MAX], devname[NAME_MAX], fulldevname[PATH_MAX];
 
 	/* release previous list */
 	bl_release_disk();
diff --git a/utils/mount/error.c b/utils/mount/error.c
index dfe5c7d..562f312 100644
--- a/utils/mount/error.c
+++ b/utils/mount/error.c
@@ -50,8 +50,8 @@
 
 extern char *progname;
 
-static char errbuf[BUFSIZ];
-static char *erreob = &errbuf[BUFSIZ];
+static char errbuf[PATH_MAX];
+static char *erreob = &errbuf[PATH_MAX];
 
 /* Convert RPC errors into strings */
 static int rpc_strerror(int spos)
-- 
2.20.1


             reply	other threads:[~2019-01-29 20:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-29 20:34 Steve Dickson [this message]
2019-01-30 19:05 ` [PATCH] nfs-utils: Removed new error=format-overflow=2 errors Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190129203459.38815-1-steved@redhat.com \
    --to=steved@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox