* mdocml: The st_size member of struct stat is off_t, which is signed, all
@ 2015-03-10 14:18 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2015-03-10 14:18 UTC (permalink / raw)
To: source
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-03-10 14:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-10 14:18 mdocml: The st_size member of struct stat is off_t, which is signed, all schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).