With gcc 7.3, we start getting several warnings like the following:
vutil.c: In function ‘VWalkVolumeHeaders’:
vutil.c:860:34: error: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 63 [-Werror=format-truncation=]
snprintf(name, VMAXPATHLEN, "%s" OS_DIRSEP "%s", partpath, dentry->d_name);
Most or all of these truncations should be okay, but increase the size
of the relevant buffers so we can build with warning checking turned
on.
Change-Id: Iac62d6fcfa46f523c34bf1b0ebc2770d3d67c174
Reviewed-on: https://gerrit.openafs.org/13274
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
int *vicep)
{
int code;
- char tempname[PR_MAXNAMELEN + 1];
+ char tempname[2*PR_MAXNAMELEN];
code = pr_Initialize(0, AFSDIR_CLIENT_ETC_DIRPATH, cellconfig->name);
if (code)
#define VHDRNAMELEN (VFORMATDIGITS + 1 + sizeof(VHDREXT) - 1) /* must match VFORMAT */
/* Maximum length (including trailing NUL) of a volume external path name. */
-#define VMAXPATHLEN 64
+#define VMAXPATHLEN 512
#if defined(AFS_NAMEI_ENV) && !defined(AFS_NT40_ENV)
afs_int32 type, count, vcount;
DIR *dirP, *dirQ;
struct dirent *dirE, *dirF;
- char name[MAXNAMELEN];
- char thisdir[MAXPATHLEN], *t;
+ char name[2*MAXNAMELEN+1];
+ char thisdir[MAXPATHLEN+4], *t;
struct DumpHeader dh; /* Defined in dump.h */
#if 0/*ndef HAVE_GETCWD*/ /* XXX enable when autoconf happens */
extern char *getwd();