Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F158937395
D15957.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
921 B
Referenced Files
None
Subscribers
None
D15957.diff
View Options
Index: lib/libc/gen/opendir.c
===================================================================
--- lib/libc/gen/opendir.c
+++ lib/libc/gen/opendir.c
@@ -218,7 +218,8 @@
struct dirent *dp;
dp = (struct dirent *) ddptr;
- if ((long)dp & 03L)
+ /* dirent should be 8-byte aligned. */
+ if (((uintptr_t)dp & 0x7) != 0)
break;
if ((dp->d_reclen <= 0) ||
(dp->d_reclen > (ddeptr + 1 - ddptr)))
Index: lib/libc/gen/readdir.c
===================================================================
--- lib/libc/gen/readdir.c
+++ lib/libc/gen/readdir.c
@@ -76,7 +76,8 @@
}
dirp->dd_flags &= ~__DTF_SKIPREAD;
dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc);
- if ((long)dp & 03L) /* bogus pointer check */
+ /* dirent should be 8-byte aligned. */
+ if (((uintptr_t)dp & 0x7) != 0)
return (NULL);
if (dp->d_reclen <= 0 ||
dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jun 8, 11:58 PM (20 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33821570
Default Alt Text
D15957.diff (921 B)
Attached To
Mode
D15957: dirent is now 8-byte aligned after ino64.
Attached
Detach File
Event Timeline
Log In to Comment