mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-09 07:42:25 +00:00
Fixed a->codebuf not null terminated in vasm.c
This commit is contained in:
parent
03af3f7160
commit
008354f865
@ -40,9 +40,12 @@ static int readline_callback(void *_a, const char *str) {
|
||||
r_cons_print ("\n\n");
|
||||
}
|
||||
if (a->acode) {
|
||||
xlen = strlen (a->acode->buf_hex);
|
||||
xlen = R_MIN (strlen (a->acode->buf_hex), R_VISUAL_ASM_BUFSIZE - 2);
|
||||
strcpy (a->codebuf, a->blockbuf);
|
||||
memcpy (a->codebuf, a->acode->buf_hex, R_MIN (xlen, R_VISUAL_ASM_BUFSIZE - 1));
|
||||
memcpy (a->codebuf, a->acode->buf_hex, xlen);
|
||||
if (xlen >= strlen (a->blockbuf)) {
|
||||
a->codebuf[xlen] = '\0';
|
||||
}
|
||||
}
|
||||
{
|
||||
int rows = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user