From 3457ded4a8e2b53923da2f8d4665b1db6cb1fa01 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 22 Nov 2002 19:47:04 +0000 Subject: more snprintf; ok millert --- lib/libc/gen/auth_subr.c | 4 ++-- lib/libc/gen/login_cap.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/libc') diff --git a/lib/libc/gen/auth_subr.c b/lib/libc/gen/auth_subr.c index 1da9ebb4149..73a080a960f 100644 --- a/lib/libc/gen/auth_subr.c +++ b/lib/libc/gen/auth_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth_subr.c,v 1.19 2002/10/30 14:54:34 drahn Exp $ */ +/* $OpenBSD: auth_subr.c,v 1.20 2002/11/22 19:47:03 deraadt Exp $ */ /*- * Copyright (c) 1995,1996,1997 Berkeley Software Design, Inc. @@ -504,7 +504,7 @@ auth_setoption(auth_session_t *as, char *n, char *v) opt->opt = (char *)(opt + 1); - sprintf(opt->opt, "%s=%s", n, v); + snprintf(opt->opt, i, "%s=%s", n, v); opt->next = as->optlist; as->optlist = opt; return(0); diff --git a/lib/libc/gen/login_cap.c b/lib/libc/gen/login_cap.c index 39556cd1ed4..af0fc0167de 100644 --- a/lib/libc/gen/login_cap.c +++ b/lib/libc/gen/login_cap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: login_cap.c,v 1.13 2002/10/09 20:36:19 millert Exp $ */ +/* $OpenBSD: login_cap.c,v 1.14 2002/11/22 19:47:03 deraadt Exp $ */ /*- * Copyright (c) 1995,1997 Berkeley Software Design, Inc. All rights reserved. @@ -523,8 +523,8 @@ gsetrl(lc, what, name, type) if (lc->lc_cap == NULL) return (0); - sprintf(name_cur, "%s-cur", name); - sprintf(name_max, "%s-max", name); + snprintf(name_cur, sizeof name_cur, "%s-cur", name); + snprintf(name_max, sizeof name_max, "%s-max", name); if (getrlimit(what, &r)) { syslog(LOG_ERR, "getting resource limit: %m"); -- cgit v1.2.3