summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authordtucker <dtucker@openbsd.org>2011-10-02 07:41:56 +0000
committerdtucker <dtucker@openbsd.org>2011-10-02 07:41:56 +0000
commita938cb2c43ffd69e522b7a8b2b6f9415619dfd06 (patch)
treef6d123976392c210379ce9508e0507fe59e29c80 /lib/libc
parentAdd a few more formats for panes (tty, pid, start cmd/cwd). (diff)
downloadwireguard-openbsd-a938cb2c43ffd69e522b7a8b2b6f9415619dfd06.tar.xz
wireguard-openbsd-a938cb2c43ffd69e522b7a8b2b6f9415619dfd06.zip
signedness fix; ok millert
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdio/mktemp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c
index 1df399aea51..0eddec6173e 100644
--- a/lib/libc/stdio/mktemp.c
+++ b/lib/libc/stdio/mktemp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mktemp.c,v 1.30 2010/03/21 23:09:30 schwarze Exp $ */
+/* $OpenBSD: mktemp.c,v 1.31 2011/10/02 07:41:56 dtucker Exp $ */
/*
* Copyright (c) 1996-1998, 2008 Theo de Raadt
* Copyright (c) 1997, 2008-2009 Todd C. Miller
@@ -45,7 +45,7 @@ mktemp_internal(char *path, int slen, int mode)
int fd;
len = strlen(path);
- if (len == 0 || slen >= len) {
+ if (len == 0 || slen < 0 || (size_t)slen >= len) {
errno = EINVAL;
return(-1);
}