mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-28 16:43:09 +00:00
Fix a bogus cast for a bogus pointer check. This only checks if the
pointer is 4-byte aligned. On a 64-bit machine it probably should check that the pointer is 8-byte aligned (eh, Bruce?) 8-)
This commit is contained in:
parent
9fcbcd0217
commit
6abbaf17ac
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=33665
@ -60,7 +60,7 @@ readdir(dirp)
|
||||
return (NULL);
|
||||
}
|
||||
dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc);
|
||||
if ((int)dp & 03) /* bogus pointer check */
|
||||
if ((long)dp & 03L) /* bogus pointer check */
|
||||
return (NULL);
|
||||
if (dp->d_reclen <= 0 ||
|
||||
dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc)
|
||||
|
Loading…
Reference in New Issue
Block a user