On Monday 05 November 2007 16:54, Paul Fox wrote:
> hi --
>
> one of our team found this while experimenting with a very large
> swap file. the symptom is that the file is rejected as having
> holes, when it does not (because the size goes negative). he did
> this some time ago, and i haven't tried to reproduce it since,
> but the fix looks correct, and moreover, benign.
>
> i'll commit in a day or two if there are no objections.
> if (S_ISREG(st.st_mode))
> - if (st.st_blocks * 512 < st.st_size)
> + if (st.st_blocks * 512u < st.st_size)
> bb_error_msg("warning: swap file has holes");
I am committing a change where 512 is casted to off_t.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox