We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2b4054 commit 717ab43Copy full SHA for 717ab43
src/dir.rs
@@ -382,7 +382,7 @@ pub const unsafe fn dirent_const_time_strlen(dirent: *const libc::dirent64) -> u
382
let reclen = unsafe { (*dirent).d_reclen as usize};
383
//find the record-length
384
// THIS WILL ONLY WORK ON LITTLE-ENDIAN ARCHITECTURES, I CANT BE BOTHERED TO FIGURE THAT OUT, qemu isnt fun
385
- // Calculate the start of the d_name field
+ // Calculate the start of the d_name field (the final word)
386
let last_word = unsafe { *((dirent as *const u8).add(reclen - 8) as *const u64) };
387
// Special case: When processing the 3rd u64 word (index 2), we need to mask
388
// the non-name bytes (d_type and padding) to avoid false null detection.
0 commit comments