libsa: f_rabuf could be NULL
It is possible that we will not get RA buffer from open(), therefore we must validate RA.
This commit is contained in:
parent
f03b083204
commit
7416e819ad
@ -108,7 +108,7 @@ read(int fd, void *dest, size_t bcount)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* will filling the readahead buffer again not help? */
|
/* will filling the readahead buffer again not help? */
|
||||||
if (resid >= SOPEN_RASIZE) {
|
if (f->f_rabuf == NULL || resid >= SOPEN_RASIZE) {
|
||||||
/*
|
/*
|
||||||
* bypass the rest of the request and leave the
|
* bypass the rest of the request and leave the
|
||||||
* buffer empty
|
* buffer empty
|
||||||
|
Loading…
Reference in New Issue
Block a user