diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-03-10 14:17:52 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-03-10 14:17:52 +0000 |
commit | dbb8d57932ef4bb217cf0861ef4f37aeee2be04c (patch) | |
tree | 703060b813d8755612a4531164610cb9c5a7eefe /read.c | |
parent | f4ebc442a65493d52d72ca85d0ef785cd81dbbc7 (diff) | |
download | mandoc-dbb8d57932ef4bb217cf0861ef4f37aeee2be04c.tar.gz |
The st_size member of struct stat is off_t, which is signed,
all required by POSIX. So don't compare it against against
an unsigned constant.
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 (st.st_size >= (1U << 31)) { + if ((size_t)st.st_size >= (1U << 31)) { mandoc_msg(MANDOCERR_TOOLARGE, curp, 0, 0, NULL); return(0); } |