diff options
author | 2013-01-08 02:26:09 +0000 | |
---|---|---|
committer | 2013-01-08 02:26:09 +0000 | |
commit | e17b29d39b4632b7daf718c334c168b07e37d08a (patch) | |
tree | 5460b583cb1f64697e60ba2b8e3a0076467ff4d6 /lib/libc/gen/auth_subr.c | |
parent | Correctly signal SIGSEGV, instead of SIGBUS, for faults caused by access to (diff) | |
download | wireguard-openbsd-e17b29d39b4632b7daf718c334c168b07e37d08a.tar.xz wireguard-openbsd-e17b29d39b4632b7daf718c334c168b07e37d08a.zip |
More int's that should be size_t for strlen() use
ok millert
Diffstat (limited to 'lib/libc/gen/auth_subr.c')
-rw-r--r-- | lib/libc/gen/auth_subr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libc/gen/auth_subr.c b/lib/libc/gen/auth_subr.c index e2612078e03..46c1011800c 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.36 2009/01/15 13:14:30 millert Exp $ */ +/* $OpenBSD: auth_subr.c,v 1.37 2013/01/08 02:26:09 deraadt Exp $ */ /* * Copyright (c) 2000-2002,2004 Todd C. Miller <Todd.Miller@courtesan.com> @@ -556,7 +556,7 @@ void auth_clroption(auth_session_t *as, char *option) { struct authopts *opt, *oopt; - int len; + size_t len; len = strlen(option); @@ -1061,7 +1061,9 @@ static void _add_rmlist(auth_session_t *as, char *file) { struct rmfiles *rm; - int i = strlen(file) + 1; + size_t i = strlen(file) + 1; + + // XXX should rangecheck i since we are about to add? if ((rm = malloc(sizeof(struct rmfiles) + i)) == NULL) { syslog(LOG_ERR, "Failed to allocate rmfiles: %m"); |