diff options
author | pst <pst@FreeBSD.org> | 1996-08-13 00:43:01 +0000 |
---|---|---|
committer | pst <pst@FreeBSD.org> | 1996-08-13 00:43:01 +0000 |
commit | 74116e670f56be16c94f1d8e8453b33de892293c (patch) | |
tree | 98de8353f1504a465acb2f96b190224543084a2e | |
parent | bb31080cd12375bc16b090515f762f7a0115b2e8 (diff) | |
download | FreeBSD-src-74116e670f56be16c94f1d8e8453b33de892293c.zip FreeBSD-src-74116e670f56be16c94f1d8e8453b33de892293c.tar.gz |
Cover a potential buffer overrun problem
-rw-r--r-- | sbin/modload/modload.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/modload/modload.c b/sbin/modload/modload.c index 9f37f9c..a9cf18f 100644 --- a/sbin/modload/modload.c +++ b/sbin/modload/modload.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: modload.c,v 1.10 1995/10/28 17:06:05 peter Exp $ + * $Id: modload.c,v 1.11 1996/04/26 18:39:48 erich Exp $ */ #include <stdio.h> @@ -235,7 +235,7 @@ main(argc, argv) p++; /* skip over '/' */ else p = modobj; - sprintf(modout, "%s%sut", _PATH_TMP, p); + snprintf(modout, sizeof modout, "%s%sut", _PATH_TMP, p); out = modout; /* * reverse meaning of -u - if we've generated a /tmp |