Skip to content

Commit

Permalink
SDK: Alignment verification
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Jul 6, 2023
1 parent e4ce0ba commit 4ac6518
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions shared/sdk/UObjectArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ FUObjectArray* FUObjectArray::get() {
return utility::ExhaustionResult::CONTINUE;
}

if (*displacement & 1 != 0) {
SPDLOG_INFO("Skipping potential GUObjectArray at 0x{:x} due to odd alignment", *displacement);
return utility::ExhaustionResult::CONTINUE;
}

// Now, we need to analyze this "structure" to see if it's actually a GUObjectArray
// We need to make sure the integer values look integer-like, and if casting them
// to 8 bytes, they must point to bad memory
Expand Down

0 comments on commit 4ac6518

Please sign in to comment.