mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue