mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 20:18:22 +00:00
[USETUP] Use RtlStringCbPrintfA instead of sprintf
Fixes GCC 8 warning: base/setup/usetup/usetup.c:3407:78: error: '%S' directive writing up to 521 bytes into a region of size 200 [-Werror=format-overflow=] "Setup is currently unable to check a partition formatted in %S.\n" ^~ base/setup/usetup/usetup.c:3406:9: note: 'sprintf' output between 128 and 649 bytes into a destination of size 260 sprintf(Buffer, ^~~~~~~~~~~~~~~ "Setup is currently unable to check a partition formatted in %S.\n" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "\n" ~~~~ " \x07 Press ENTER to continue Setup.\n" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " \x07 Press F3 to quit Setup.", ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PartEntry->FileSystem); ~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
ead2156a29
commit
6129fbaf1e
1 changed files with 8 additions and 6 deletions
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include <usetup.h>
|
||||
#include <math.h>
|
||||
#include <ntstrsafe.h>
|
||||
|
||||
#include "bootsup.h"
|
||||
#include "chkdsk.h"
|
||||
|
@ -3403,7 +3404,8 @@ CheckFileSystemPage(PINPUT_RECORD Ir)
|
|||
*/
|
||||
PartEntry->NeedsCheck = FALSE;
|
||||
|
||||
sprintf(Buffer,
|
||||
RtlStringCbPrintfA(Buffer,
|
||||
sizeof(Buffer),
|
||||
"Setup is currently unable to check a partition formatted in %S.\n"
|
||||
"\n"
|
||||
" \x07 Press ENTER to continue Setup.\n"
|
||||
|
|
Loading…
Reference in a new issue