Unnecessary addition operation at function call in decompiled code
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- cpp
- Ambito
- reverse-engineering
Direzione di ricerca
Review the reported decompiled C and the strcpy_s disassembly in this issue, focusing on the argument represented as wot + 0x28. Reproduction will require an equivalent binary or test case, which the report does not provide; done means the decompiler emits the expected 0x28 size without the unnecessary variable or addition.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
- Binary Ninja Version: 3.2.3782-dev
- OS: Windows 10 x64
Bug Description:
int64_t var_d8 = -2
void var_108
int64_t rax_1 = __security_cookie ^ &var_108
BOOL wot = TryEnterCriticalSection(&this->Lock)
if (wot != 0)
this->vft->field_c0(this)
this->vft->Stop(this)
this->field_70 = 0
LeaveCriticalSection(&this->Lock)
else
char Destination[0x28]
// BUG here
// wot + 0x28?
// wot = 0, 0 + 0x28, why?
strcpy_s(&Destination, zx.q(wot + 0x28), "Stop")
int64_t rcx_3 = this->field_510
if (rcx_3 == 0)
void*** rax_2 = operator new(0x40)
void*** var_d0_1 = rax_2
if (rax_2 == 0)
rcx_3 = 0
else
rcx_3 = sub_180093810(rax_2)
this->field_510 = rcx_3
(*(*rcx_3 + 8))(rcx_3, &Destination, 0xa8, 0, 0xffffffff)
__security_check_cookie(rax_1 ^ &var_108)
Disassembly of strcpy_s call:
lea r8, [rel data_1800ca610] {"Stop"}
lea edx, [rax+0x28]
lea rcx, [rsp+0x40 {Destination}]
call qword [rel strcpy_s]
Expected Behavior:
I expect it to show only 0x28
Additional Information:
IDA does not even creates wot variable.
if ( TryEnterCriticalSection(&this->Lock) )
{
this->vft->sub_180099A50(this);
this->vft->Stop(this);
this->field_70 = 0;
LeaveCriticalSection(&this->Lock);
}
else
{
strcpy_s(Destination, 0x28ui64, "Stop");
I can not share the binary unfortunately.
- Lingua principale
- C++
- Stelle
- 1.3k
- Fork
- 298
- Merge medio
- 5g 5h
- PR unite (30g)
- 19
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Vector35/binaryninja-api
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
Vector35/binaryninja-api#8540 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Vector35/binaryninja-api#8516 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
Vector35/binaryninja-api#8503 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
Vector35/binaryninja-api#8446 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
Vector35/binaryninja-api#8444 ·
Tutte le issue di Vector35/binaryninja-api
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
autowarefoundation/autoware_universe#13413 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
automated-analysis bug memory-safety
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
gazebosim/gz-sensors#662 · 1 commento ·