From 036876cd7d53236278fcfbd3a89e4ed9a4d9a214 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sat, 1 Oct 2011 18:46:12 +1000 Subject: - (dtucker) [openbsd-compat/mktemp.c] Fix compiler warning. ok djm --- ChangeLog | 3 +++ openbsd-compat/mktemp.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b799c1c22..76a5dd086 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2011101 + - (dtucker) [openbsd-compat/mktemp.c] Fix compiler warning. ok djm + 20110929 - (djm) [configure.ac defines.h] No need to detect sizeof(char); patch from des AT des.no diff --git a/openbsd-compat/mktemp.c b/openbsd-compat/mktemp.c index 773e9eaa5..4eb52f421 100644 --- a/openbsd-compat/mktemp.c +++ b/openbsd-compat/mktemp.c @@ -54,7 +54,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); } -- cgit v1.2.3