Removed new error=format-overflow=2 errors

Signed-off-by: Steve Dickson <steved@redhat.com>
This commit is contained in:
Steve Dickson 2019-01-30 14:06:25 -05:00
parent 3f7988e54b
commit f05351d36c
2 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,47 @@
From 94de9a2112cddfdacdb7d63b5c24be99e3db4124
From: Steve Dickson <steved@redhat.com>
Date: Tue, 29 Jan 2019 15:31:06 -0500
Subject: [PATCH] nfs-utils: Removed new error=format-overflow=2 errors
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

View File

@ -19,6 +19,7 @@ Source7: nfs-convert.service
Patch001: nfs-utils.2.3.4-rc2.patch Patch001: nfs-utils.2.3.4-rc2.patch
Patch002: nfs-utils-2.3.3-nfsref-linking.patch Patch002: nfs-utils-2.3.3-nfsref-linking.patch
Patch003: nfs-utils-2.3.3-printf-4k.patch
Patch100: nfs-utils-1.2.1-statdpath-man.patch Patch100: nfs-utils-1.2.1-statdpath-man.patch
Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch
@ -317,6 +318,7 @@ fi
%changelog %changelog
* Wed Jan 30 2019 Steve Dickson <steved@redhat.com> 2.3.3-4.rc2 * Wed Jan 30 2019 Steve Dickson <steved@redhat.com> 2.3.3-4.rc2
- Make sysconfig/nfs mutable when the package is removed - Make sysconfig/nfs mutable when the package is removed
- Removed new error=format-overflow=2 errors
* Tue Dec 11 2018 Steve Dickson <steved@redhat.com> 2.3.3-3.rc2 * Tue Dec 11 2018 Steve Dickson <steved@redhat.com> 2.3.3-3.rc2
- Updated to latest RC release: nfs-utils-2-3-4-rc2 - Updated to latest RC release: nfs-utils-2-3-4-rc2