mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 14:26:03 -04:00
Annotate that we don't check the returned data length from ufs_readdir()
because UFS uses fixed-size directory blocks. When using this code with other file systems, such as HFS+, the value of auio.uio_resid will need to be taken into account.
This commit is contained in:
parent
c63d83f7c2
commit
12ec7658a4
1 changed files with 6 additions and 0 deletions
|
|
@ -410,6 +410,12 @@ ufs_extattr_iterate_directory(struct ufsmount *ump, struct vnode *dvp,
|
|||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* XXXRW: While in UFS, we always get DIRBLKSIZ returns from
|
||||
* the directory code on success, on other file systems this
|
||||
* may not be the case. For portability, we should check the
|
||||
* read length on return from ufs_readdir().
|
||||
*/
|
||||
edp = (struct dirent *)&dirbuf[DIRBLKSIZ];
|
||||
for (dp = (struct dirent *)dirbuf; dp < edp; ) {
|
||||
#if (BYTE_ORDER == LITTLE_ENDIAN)
|
||||
|
|
|
|||
Loading…
Reference in a new issue