diff options
author | imp <imp@FreeBSD.org> | 1997-12-24 18:56:03 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1997-12-24 18:56:03 +0000 |
commit | 604bcde61e03e4ca051aae2c87b0f250a3806280 (patch) | |
tree | 1ef9d5908599dfec43502dee23a1b807123cb4dd /libexec/bootpd/readfile.c | |
parent | d97fabbb53b5ec9256c2d5ae44081162784d35d7 (diff) | |
download | FreeBSD-src-604bcde61e03e4ca051aae2c87b0f250a3806280.zip FreeBSD-src-604bcde61e03e4ca051aae2c87b0f250a3806280.tar.gz |
Use snprintf rather than printf out of paranoia
Obtained from: OpenBSD
Diffstat (limited to 'libexec/bootpd/readfile.c')
-rw-r--r-- | libexec/bootpd/readfile.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/bootpd/readfile.c b/libexec/bootpd/readfile.c index 8dfd430..8d895fd 100644 --- a/libexec/bootpd/readfile.c +++ b/libexec/bootpd/readfile.c @@ -19,7 +19,7 @@ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - $Id$ + $Id: readfile.c,v 1.4 1997/02/22 14:21:09 peter Exp $ ************************************************************************/ @@ -817,7 +817,8 @@ eval_symbol(symbol, hp) if ((*symbol)[0] == 'T') { /* generic symbol */ (*symbol)++; value = get_u_long(symbol); - sprintf(current_tagname, "T%d", (int)value); + snprintf(current_tagname, sizeof(current_tagname), + "T%d", (int)value); eat_whitespace(symbol); if ((*symbol)[0] != '=') { return E_SYNTAX_ERROR; |