Fix fread returning bad data.
Bug: 19172514 Change-Id: I05016577858a02aca7d14e75e6ec28abc925037c
This commit is contained in:
@@ -102,6 +102,12 @@ fread(void *buf, size_t size, size_t count, FILE *fp)
|
||||
* avoid copying it through the buffer?
|
||||
*/
|
||||
if (total > (size_t) fp->_bf._size) {
|
||||
/*
|
||||
* Make sure that fseek doesn't think it can
|
||||
* reuse the buffer since we are going to read
|
||||
* directly from the file descriptor.
|
||||
*/
|
||||
fp->_flags |= __SMOD;
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user