diff options
author | Sean McBride <sean@rogue-research.com> | 2022-06-17 23:57:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-06-22 12:59:40 (GMT) |
commit | d5694e46233aa7173134fc3952b5f25a7e0b0f58 (patch) | |
tree | 4345562d4404fc697170e23485d6d650f6798699 /Source/CursesDialog/form/fty_int.c | |
parent | eccd0b92b6463f86ca010b6a256a4448bb378549 (diff) | |
download | CMake-d5694e46233aa7173134fc3952b5f25a7e0b0f58.zip CMake-d5694e46233aa7173134fc3952b5f25a7e0b0f58.tar.gz CMake-d5694e46233aa7173134fc3952b5f25a7e0b0f58.tar.bz2 |
Source: Replace uses of sprintf with safer snprintf
Diffstat (limited to 'Source/CursesDialog/form/fty_int.c')
-rw-r--r-- | Source/CursesDialog/form/fty_int.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CursesDialog/form/fty_int.c b/Source/CursesDialog/form/fty_int.c index 7107fcc..7aeb4b8 100644 --- a/Source/CursesDialog/form/fty_int.c +++ b/Source/CursesDialog/form/fty_int.c @@ -117,7 +117,7 @@ static bool Check_Integer_Field(FIELD * field, const void * argp) { if (val<low || val>high) return FALSE; } - sprintf(buf,"%.*ld",(prec>0?prec:0),val); + snprintf(buf,sizeof(buf),"%.*ld",(prec>0?prec:0),val); set_field_buffer(field,0,buf); return TRUE; } |