Andreas Schwab: > > When the file size is very large or the filesystem is poor, the read(2) > > systemcall may not read all of the file. In this case, the return value > > will be shorter than the requested bytes. > > Even worse, if read returns -1 then this writes beyond array bounds. > Also, file_size is size_t, but result is only int.
Thank you for your reply. Although I think these are rare cases, they can be a problem. - a file larger than MAX_INT. - read(2) error (returns -1) + signal? + another process issues chmod(2) and makes the file unreadable, between fstat(2) and read(2) in _evalfile(). + or anything else. - read(2) succeeds, but the return value is shorter than the requested bytes. Do you have a plan to fix it? Junjiro Okajima _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash