summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2011-10-01 18:46:12 +1000
committerDarren Tucker <dtucker@zip.com.au>2011-10-01 18:46:12 +1000
commit036876cd7d53236278fcfbd3a89e4ed9a4d9a214 (patch)
treeb69287763de07a17a183d942890247ed630e5a67
parentb54f50e5d0053e2c79fbb5032722aca541fdc6c1 (diff)
- (dtucker) [openbsd-compat/mktemp.c] Fix compiler warning. ok djm
-rw-r--r--ChangeLog3
-rw-r--r--openbsd-compat/mktemp.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b799c1c22..76a5dd086 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
12011101
2 - (dtucker) [openbsd-compat/mktemp.c] Fix compiler warning. ok djm
3
120110929 420110929
2 - (djm) [configure.ac defines.h] No need to detect sizeof(char); patch 5 - (djm) [configure.ac defines.h] No need to detect sizeof(char); patch
3 from des AT des.no 6 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)
54 int fd; 54 int fd;
55 55
56 len = strlen(path); 56 len = strlen(path);
57 if (len == 0 || slen >= len) { 57 if (len == 0 || slen < 0 || (size_t)slen >= len) {
58 errno = EINVAL; 58 errno = EINVAL;
59 return(-1); 59 return(-1);
60 } 60 }