Skip to content

Commit aaf1235

Browse files
committed
[win/asan] GetInstructionSize: Always initialize rel_offset, if given.
1 parent 368da2e commit aaf1235

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler-rt/lib/interception/interception_win.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,11 @@ static const u8 kPrologueWithShortJump2[] = {
482482

483483
// Returns 0 on error.
484484
static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
485+
486+
if (rel_offset) {
487+
*rel_offset = 0;
488+
}
489+
485490
#if SANITIZER_ARM64
486491
// An ARM64 instruction is 4 bytes long.
487492
return 4;

0 commit comments

Comments
 (0)