mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
venus: fix format overflow warning
Recent versions of gcc generate a format overflow warning on the dfstring buffer in fs.c. Increase the size of the buffer to avoid a possible buffer overflow. fs.c: In function ‘AclToString’: fs.c:770:30: error: ‘%s’ directive writing up to 1024 bytes into a region of size between 13 and 23 [-Werror=format-overflow=] sprintf(dfsstring, " dfs:%d %s", acl->dfs, acl->cell); ^~ fs.c:770:2: note: ‘sprintf’ output between 8 and 1042 bytes into a destination of size 30 sprintf(dfsstring, " dfs:%d %s", acl->dfs, acl->cell); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reviewed-on: https://gerrit.openafs.org/12917 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com> (cherry picked from commitc84f36a9b8
) Reviewed-on: https://gerrit.openafs.org/13099 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> (cherry picked from commite1b71e8845
) Change-Id: I332d283c787f35b0d5d72e1c9e8de1145e177719 Reviewed-on: https://gerrit.openafs.org/13499 Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
This commit is contained in:
parent
3fd5e945e3
commit
6b2caf63d5
@ -747,7 +747,7 @@ AclToString(struct Acl *acl)
|
||||
{
|
||||
static char mydata[AFS_PIOCTL_MAXSIZE];
|
||||
char tstring[AFS_PIOCTL_MAXSIZE];
|
||||
char dfsstring[30];
|
||||
char dfsstring[AFS_PIOCTL_MAXSIZE];
|
||||
struct AclEntry *tp;
|
||||
|
||||
if (acl->dfs)
|
||||
|
Loading…
Reference in New Issue
Block a user