Fix unsafe strcpy in bzip2recover

Patch from Red Hat
This commit is contained in:
Federico Mena Quintero 2019-05-27 13:52:31 -05:00
parent d25ff6fa78
commit 010e90ddee

View File

@ -309,7 +309,8 @@ Int32 main ( Int32 argc, Char** argv )
UInt32 buffHi, buffLo, blockCRC; UInt32 buffHi, buffLo, blockCRC;
Char* p; Char* p;
strcpy ( progName, argv[0] ); strncpy ( progName, argv[0], BZ_MAX_FILENAME-1);
progName[BZ_MAX_FILENAME-1]='\0';
inFileName[0] = outFileName[0] = 0; inFileName[0] = outFileName[0] = 0;
fprintf ( stderr, fprintf ( stderr,