Skip to content

Commit 497ee56

Browse files
glebmsezero
authored andcommitted
Fix -wformat-overflow in ABC_Init
Fixes the following warnings ``` load_abc.cpp:2374:42: warning: ‘%ld’ directive writing between 1 and 20 bytes into a region of size 18 [-Wformat-overflow=] 2374 | sprintf(buf,"%s=-%ld",ABC_ENV_NORANDOMPICK,retval->pickrandom+2); | ^~~ load_abc.cpp:2374:37: note: directive argument in the range [-9223372036854775806, 9223372036854775807] 2374 | sprintf(buf,"%s=-%ld",ABC_ENV_NORANDOMPICK,retval->pickrandom+2); | ^~~~~~~~~ load_abc.cpp:2374:32: note: ‘sprintf’ output between 24 and 43 bytes into a destination of size 40 2374 | sprintf(buf,"%s=-%ld",ABC_ENV_NORANDOMPICK,retval->pickrandom+2); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
1 parent 9bcabf6 commit 497ee56

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/load_abc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2361,7 +2361,7 @@ BOOL CSoundFile::TestABC(const BYTE *lpStream, DWORD dwMemLength)
23612361
// =====================================================================================
23622362
static ABCHANDLE *ABC_Init(void)
23632363
{
2364-
static char buf[40];
2364+
static char buf[43];
23652365
ABCHANDLE *retval;
23662366
char *p;
23672367
retval = (ABCHANDLE *)calloc(1,sizeof(ABCHANDLE));

0 commit comments

Comments
 (0)