X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Futils%2Fmono-filemap.c;h=36c7fd6df93abbdec09fb325c2957bad9dbe1e61;hb=c265540e7615efb3a02fc073f6c4fd8395c54e4a;hp=5278c00c13357af4cb5ba3a41dc11131d074207e;hpb=7db21936c7127234ea6bac9ceee6343c2eefa59d;p=mono.git diff --git a/mono/utils/mono-filemap.c b/mono/utils/mono-filemap.c index 5278c00c133..36c7fd6df93 100644 --- a/mono/utils/mono-filemap.c +++ b/mono/utils/mono-filemap.c @@ -86,6 +86,8 @@ mono_file_map_fileio (size_t length, int flags, int fd, guint64 offset, void **r return NULL; } bytes_read = read (fd, ptr, length); + if (bytes_read != length) + return NULL; lseek (fd, cur_offset, SEEK_SET); *ret_handle = NULL; return ptr;