source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Fix previous: size_t is often narrower than off_t.
@ 2015-03-11 13:05 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2015-03-11 13:05 UTC (permalink / raw)
  To: source

Log Message:
-----------
Fix previous: size_t is often narrower than off_t.
Cluestick applied by joerg at NetBSD.

Modified Files:
--------------
    mdocml:
        read.c

Revision Data
-------------
Index: read.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/read.c,v
retrieving revision 1.130
retrieving revision 1.131
diff -Lread.c -Lread.c -u -p -r1.130 -r1.131
--- read.c
+++ read.c
@@ -636,7 +636,7 @@ read_whole_file(struct mparse *curp, con
 	 */
 
 	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);
 		}
--
 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-11 13:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-11 13:05 mdocml: Fix previous: size_t is often narrower than off_t 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).