From 02748c634c0f2a48d333e7a2d406e5c71f0d99d5 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 16 Sep 1996 18:49:09 +0000 Subject: sprintf -> snprintf paranoia --- kerberosIV/make_keypair/make_keypair.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'kerberosIV/make_keypair/make_keypair.c') diff --git a/kerberosIV/make_keypair/make_keypair.c b/kerberosIV/make_keypair/make_keypair.c index b25f1545f43..2b669504535 100644 --- a/kerberosIV/make_keypair/make_keypair.c +++ b/kerberosIV/make_keypair/make_keypair.c @@ -1,4 +1,4 @@ -/* $Id: make_keypair.c,v 1.2 1995/12/29 09:49:55 tholo Exp $ */ +/* $Id: make_keypair.c,v 1.3 1996/09/16 18:49:04 millert Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -109,8 +109,7 @@ make_key(addr) char namebuf[255]; int fd; - (void)sprintf(namebuf, "%s", - inet_ntoa(addr)); + (void)snprintf(namebuf, sizeof(namebuf), "%s", inet_ntoa(addr)); fd = open(namebuf, O_WRONLY|O_CREAT, 0600); if (fd < 0) { perror("open"); -- cgit v1.2.3