Skip to content

Commit 255c536

Browse files
committed
Modules/IOStates: avoid creating an unneeded temporary variable
Signed-off-by: Marco Wang <m.aesophor@gmail.com>
1 parent 7ce2134 commit 255c536

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Modules/IOStates/IOStates.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,12 +342,11 @@ void IOStates::maybeInterceptStackCanary(S2EExecutionState *state,
342342

343343
if (hasReachedMain &&
344344
i.mnemonic == "mov" && i.opStr == "rax, qword ptr fs:[0x28]") {
345-
uint64_t canary = reg().readConcrete(Register::X64::RAX);
346-
m_canary = canary;
345+
m_canary = reg().readConcrete(Register::X64::RAX);
347346

348347
log<WARN>()
349348
<< '[' << hexval(i.address) << "] "
350-
<< "Intercepted canary: " << hexval(canary) << '\n';
349+
<< "Intercepted canary: " << hexval(m_canary) << '\n';
351350
}
352351
}
353352

0 commit comments

Comments
 (0)