From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]); by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 6578432f; for ; Tue, 10 Mar 2015 09:18:22 -0500 (EST) Date: Tue, 10 Mar 2015 09:18:22 -0500 (EST) Message-Id: <1281237932347383369.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: The st_size member of struct stat is off_t, which is signed, all X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- 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. Modified Files: -------------- mdocml: read.c Revision Data ------------- Index: read.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/read.c,v retrieving revision 1.129 retrieving revision 1.130 diff -Lread.c -Lread.c -u -p -r1.129 -r1.130 --- read.c +++ read.c @@ -636,7 +636,7 @@ read_whole_file(struct mparse *curp, con */ 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); } -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv