mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
butc: fix format overflow warning
Recent versions of gcc generate an overflow warning in the butc DUMPNAME macro when copying values into the finishedMsg1 buffer. Increase the size of the destination buffer to avoid a possible buffer overflow. dump.c:88:24: error: ‘%s’ directive writing up to 63 bytes into a region of size 50 [-Werror=format-overflow=] sprintf(dumpname, "%s (DumpId %u)", name, dbDumpId); ^ dump.c:1294:5: note: in expansion of macro ‘DUMPNAME’ DUMPNAME(finishedMsg1, nodePtr->dumpSetName, dparams.databaseDumpId); ^~~~~~~~ dump.c:88:6: note: ‘sprintf’ output between 12 and 84 bytes into a destination of size 50 sprintf(dumpname, "%s (DumpId %u)", name, dbDumpId); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dump.c:1294:5: note: in expansion of macro ‘DUMPNAME’ DUMPNAME(finishedMsg1, nodePtr->dumpSetName, dparams.databaseDumpId); ^~~~~~~~ Change-Id: Iadf87a308ab6c500a8407a269bc0fd443ff0c735 Reviewed-on: https://gerrit.openafs.org/12916 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
parent
c44f6f7a80
commit
cec45d5944
@ -1116,7 +1116,7 @@ Dumper(void *param)
|
||||
int nodumpvolumes = 0;
|
||||
char strlevel[5];
|
||||
char msg[20];
|
||||
char finishedMsg1[50];
|
||||
char finishedMsg1[128];
|
||||
char finishedMsg2[50];
|
||||
time_t startTime = 0;
|
||||
time_t endTime = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user