diff options
author | 2003-04-05 13:41:43 +0000 | |
---|---|---|
committer | 2003-04-05 13:41:43 +0000 | |
commit | 4ad390e718bc5c1c5726077229287f34a149fdc7 (patch) | |
tree | c349dd3c0d0d322b0d17d1a00ecb830a5fca79ae | |
parent | strlcpy (diff) | |
download | wireguard-openbsd-4ad390e718bc5c1c5726077229287f34a149fdc7.tar.xz wireguard-openbsd-4ad390e718bc5c1c5726077229287f34a149fdc7.zip |
sprintf->snprintf
-rw-r--r-- | lib/libform/fty_int.c | 4 | ||||
-rw-r--r-- | lib/libform/fty_num.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libform/fty_int.c b/lib/libform/fty_int.c index cc6dc34d3bd..5cc185e5e5c 100644 --- a/lib/libform/fty_int.c +++ b/lib/libform/fty_int.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fty_int.c,v 1.6 2001/01/22 18:02:17 millert Exp $ */ +/* $OpenBSD: fty_int.c,v 1.7 2003/04/05 13:41:43 espie Exp $ */ /* @@ -119,7 +119,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; } diff --git a/lib/libform/fty_num.c b/lib/libform/fty_num.c index 7e3b76fc367..c3bf889dc29 100644 --- a/lib/libform/fty_num.c +++ b/lib/libform/fty_num.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fty_num.c,v 1.6 2001/01/22 18:02:17 millert Exp $ */ +/* $OpenBSD: fty_num.c,v 1.7 2003/04/05 13:41:43 espie Exp $ */ /* @@ -143,7 +143,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; } |