Boston, MA 02110-1301, USA. */
#include <config.h>
+#include <limits.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
overflow. The calculations below double the file size
twice, so check that it can be multiplied by 4 safely. */
if (XINT (end) != st.st_size
- || ((int) st.st_size * 4) / 4 != st.st_size)
+ || st.st_size > INT_MAX / 4)
error ("Maximum buffer size exceeded");
/* The file size returned from stat may be zero, but data