librz/analysis: prefix analysis fix memmove() call (#4918)
This commit is contained in:
parent
e742a10af7
commit
e76b9e2d60
1 changed files with 6 additions and 2 deletions
|
|
@ -5208,8 +5208,12 @@ static void *AnalysisBytesContext_next(RzIterator *it) {
|
|||
*sp = 0;
|
||||
if (op->prefix) {
|
||||
char *p = strchr(sp + 1, ' ');
|
||||
*p = 0;
|
||||
memmove(ctx->mnemonic, sp + 1, p - sp);
|
||||
if (!p) {
|
||||
rz_str_ncpy(ctx->mnemonic, sp + 1, strlen(sp + 1) + 1);
|
||||
} else {
|
||||
*p = 0;
|
||||
rz_str_ncpy(ctx->mnemonic, sp + 1, p - sp);
|
||||
}
|
||||
}
|
||||
}
|
||||
op->mnemonic = mnem;
|
||||
|
|
|
|||
Loading…
Reference in a new issue