Re: [PATCH] nfs-utils: Removed new error=format-overflow=2 errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 1/29/19 3:34 PM, Steve Dickson wrote:
> 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@xxxxxxxxxx>
Committed.... 

steved.

> ---
>  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)
> 




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux