diff options
author | Brad King <brad.king@kitware.com> | 2022-06-23 13:31:31 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-06-23 13:31:40 (GMT) |
commit | b865fead7562b9abea847f5e7c0f52e34157a3a0 (patch) | |
tree | f35acc6e97b67a97eb271216f68d69a52f07560b /Source/CursesDialog/form/fty_num.c | |
parent | 6760180f578c55212a4b4c7e691e7fd369ae36ba (diff) | |
parent | d5694e46233aa7173134fc3952b5f25a7e0b0f58 (diff) | |
download | CMake-b865fead7562b9abea847f5e7c0f52e34157a3a0.zip CMake-b865fead7562b9abea847f5e7c0f52e34157a3a0.tar.gz CMake-b865fead7562b9abea847f5e7c0f52e34157a3a0.tar.bz2 |
Merge topic 'snprintf'
d5694e4623 Source: Replace uses of sprintf with safer snprintf
eccd0b92b6 Source: Tell Git not to check whitespace in third-party curses form code
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7383
Diffstat (limited to 'Source/CursesDialog/form/fty_num.c')
-rw-r--r-- | Source/CursesDialog/form/fty_num.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CursesDialog/form/fty_num.c b/Source/CursesDialog/form/fty_num.c index 7809599..4109b6f 100644 --- a/Source/CursesDialog/form/fty_num.c +++ b/Source/CursesDialog/form/fty_num.c @@ -140,7 +140,7 @@ static bool Check_Numeric_Field(FIELD * field, const void * argp) { if (val<low || val>high) return FALSE; } - sprintf(buf,"%.*f",(prec>0?prec:0),val); + snprintf(buf,sizeof(buf),"%.*f",(prec>0?prec:0),val); set_field_buffer(field,0,buf); return TRUE; } |