diff options
author | 2002-11-22 19:47:03 +0000 | |
---|---|---|
committer | 2002-11-22 19:47:03 +0000 | |
commit | fffa4e842e55f91b385a019a880f1681db77d3c9 (patch) | |
tree | 58be74ca1106d7829cb3c4a69649dadc431b23e9 | |
parent | exaple ruleset for the new queue stuff (diff) | |
download | wireguard-openbsd-fffa4e842e55f91b385a019a880f1681db77d3c9.tar.xz wireguard-openbsd-fffa4e842e55f91b385a019a880f1681db77d3c9.zip |
more snprintf; ok millert
-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"); |