mirror of
https://github.com/nikaiw/VMkatz
synced 2026-09-25 07:51:06 +00:00
Fix DCC2 pad4 DWORD alignment calculation
pad4(5) was returning 6 instead of 8. Use standard (len+3)&!3.
This commit is contained in:
+2
-6
@@ -209,11 +209,7 @@ pub fn extract_cached_credentials(
|
||||
Ok(credentials)
|
||||
}
|
||||
|
||||
/// Pad a length to DWORD alignment (Windows-style: add len & 3 if not aligned).
|
||||
/// Round up to DWORD alignment.
|
||||
fn pad4(len: usize) -> usize {
|
||||
if (len & 0x3) > 0 {
|
||||
len + (len & 0x3)
|
||||
} else {
|
||||
len
|
||||
}
|
||||
(len + 3) & !3
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user