Hi, At Sat, 9 Mar 2002 03:40:11 +0900, Jonathan Baker wrote: > if (st.st_size > pos && pos >= 0) { > siz = st.st_size - pos + 1; > + if (siz > LONG_MAX) { > + rb_raise(rb_eIOError, "file too big for single > read") > + } > } > > with a cast later on: > > n = io_fread(RSTRING(str)->ptr+bytes, (long)siz-bytes, fptr->f); > > and leave the declaration of io_fread as is, since you can't address > anything bigger anyway. Well, it seems reasonable and may be better. -- Nobu Nakada