mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-09 15:00:42 +00:00
Fix UB with undeflow on anal.x86_cs
This commit is contained in:
parent
2c207c534a
commit
148cdb9665
@ -324,7 +324,8 @@ static char *getarg(struct Getarg* gop, int n, int set, char *setop, int sel, ut
|
||||
// set = 2 is reserved for lea, where the operand is a memory address,
|
||||
// but the corresponding memory is not loaded.
|
||||
if (set == 1) {
|
||||
if (setarg[strlen (setarg) - 1] == ',') {
|
||||
size_t len = strlen (setarg);
|
||||
if (len > 0 && setarg[len - 1] == ',') {
|
||||
snprintf (buf_, BUF_SZ, "%s,%s%s=[%d]", out, setarg,
|
||||
gop->bits == 32 ? "0xffffffff,&," : "", op.size==10?8:op.size);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user