From fa6ff49ac5a45cffe23eed484ea775e6103b04e1 Mon Sep 17 00:00:00 2001 From: tedu <> Date: Tue, 20 Jan 2015 22:09:50 +0000 Subject: [PATCH] increase TMP_MAX to the equivalent of INT_MAX. it's actually more, but safer not to wraparound by accident. ok deraadt millert miod --- src/include/limits.h | 4 ++-- src/include/stdio.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/include/limits.h b/src/include/limits.h index 1776bf76..08913b42 100644 --- a/src/include/limits.h +++ b/src/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.18 2013/03/01 21:16:34 guenther Exp $ */ +/* $OpenBSD: limits.h,v 1.19 2015/01/20 22:09:50 tedu Exp $ */ /* $NetBSD: limits.h,v 1.7 1994/10/26 00:56:00 cgd Exp $ */ /* @@ -96,7 +96,7 @@ #if __XPG_VISIBLE # if __XPG_VISIBLE < 600 # define PASS_MAX 128 /* _PASSWORD_LEN from */ -# define TMP_MAX 308915776 +# define TMP_MAX 0x7fffffff /* more, but don't overflow int */ # endif # if __XPG_VISIBLE < 700 diff --git a/src/include/stdio.h b/src/include/stdio.h index c8999a79..2d9f3516 100644 --- a/src/include/stdio.h +++ b/src/include/stdio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdio.h,v 1.49 2014/03/27 15:28:16 tedu Exp $ */ +/* $OpenBSD: stdio.h,v 1.50 2015/01/20 22:09:50 tedu Exp $ */ /* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */ /*- @@ -191,7 +191,7 @@ __END_DECLS #define P_tmpdir "/tmp/" #endif #define L_tmpnam 1024 /* XXX must be == PATH_MAX */ -#define TMP_MAX 308915776 +#define TMP_MAX 0x7fffffff /* more, but don't overflow int */ #ifndef SEEK_SET #define SEEK_SET 0 /* set file offset to offset */