summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/auth_subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/auth_subr.c')
-rw-r--r--lib/libc/gen/auth_subr.c8
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");