projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge pull request #1337 from RyanMelenaNoesis/master
[mono.git]
/
mono
/
utils
/
mono-filemap.c
diff --git
a/mono/utils/mono-filemap.c
b/mono/utils/mono-filemap.c
index 5278c00c13357af4cb5ba3a41dc11131d074207e..36c7fd6df93abbdec09fb325c2957bad9dbe1e61 100644
(file)
--- 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;