mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
If bread() returns a zero-length buffer, as can happen after a
failed write, return an error instead of looping forever. PR: 37035 Submitted by: das
This commit is contained in:
parent
5cc1a74e77
commit
3c01bab8a3
1 changed files with 4 additions and 0 deletions
|
|
@ -1571,6 +1571,10 @@ msdosfs_readdir(ap)
|
|||
return (error);
|
||||
}
|
||||
n = min(n, blsize - bp->b_resid);
|
||||
if (n == 0) {
|
||||
brelse(bp);
|
||||
return (EIO);
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert from dos directory entries to fs-independent
|
||||
|
|
|
|||
Loading…
Reference in a new issue