diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-03-11 13:05:20 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-03-11 13:05:20 +0000 |
commit | a6b05481ff237dc3c50886dab2642a2d007a78ff (patch) | |
tree | cbe67e592bfacba0d946f08fc005dc99def9779f /read.c | |
parent | dbb8d57932ef4bb217cf0861ef4f37aeee2be04c (diff) | |
download | mandoc-a6b05481ff237dc3c50886dab2642a2d007a78ff.tar.gz |
Fix previous: size_t is often narrower than off_t.
Cluestick applied by joerg at NetBSD.
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -636,7 +636,7 @@ read_whole_file(struct mparse *curp, const char *file, int fd, */ if (S_ISREG(st.st_mode)) { - if ((size_t)st.st_size >= (1U << 31)) { + if (st.st_size > 0x7fffffff) { mandoc_msg(MANDOCERR_TOOLARGE, curp, 0, 0, NULL); return(0); } |