diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c index 84a0c6c625c..8b6c0bd165a 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3589,6 +3589,12 @@ actually used.") | |||
| 3589 | if (XINT (end) != st.st_size | 3589 | if (XINT (end) != st.st_size |
| 3590 | || ((int) st.st_size * 4) / 4 != st.st_size) | 3590 | || ((int) st.st_size * 4) / 4 != st.st_size) |
| 3591 | error ("Maximum buffer size exceeded"); | 3591 | error ("Maximum buffer size exceeded"); |
| 3592 | |||
| 3593 | /* The file size returned from stat may be zero, but data | ||
| 3594 | may be readable nonetheless, for example when this is a | ||
| 3595 | file in the /proc filesystem. */ | ||
| 3596 | if (st.st_size == 0) | ||
| 3597 | XSETINT (end, READ_BUF_SIZE); | ||
| 3592 | } | 3598 | } |
| 3593 | } | 3599 | } |
| 3594 | 3600 | ||