diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-11-22 19:47:04 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-11-22 19:47:04 +0000 |
commit | 3457ded4a8e2b53923da2f8d4665b1db6cb1fa01 (patch) | |
tree | 620ba239d6d21468e3c12c0a34cff497758e509b /lib | |
parent | 3fde5b50007bf5cf789fef9747542b243b5c98b6 (diff) |
more snprintf; ok millert
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/auth_subr.c | 4 | ||||
-rw-r--r-- | lib/libc/gen/login_cap.c | 6 |
2 files changed, 5 insertions, 5 deletions
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"); |