mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-13 01:00:37 +00:00
Fix oob read when doing wtf!
This commit is contained in:
parent
e01822f973
commit
20dc587f7b
@ -1000,7 +1000,7 @@ static int cmd_write(void *data, const char *input) {
|
||||
} else {
|
||||
filename = "";
|
||||
}
|
||||
} else if (*str=='a') { // "wta"
|
||||
} else if (*str == 'a') { // "wta"
|
||||
append = 1;
|
||||
str++;
|
||||
if (str[0] == ' ') {
|
||||
@ -1017,7 +1017,7 @@ static int cmd_write(void *data, const char *input) {
|
||||
} else {
|
||||
filename = str + 1;
|
||||
}
|
||||
tmp = strchr (str + 1, ' ');
|
||||
tmp = *str? strchr (str + 1, ' ') : NULL;
|
||||
if (!filename || !*filename) {
|
||||
const char* prefix = r_config_get (core->config, "cfg.prefixdump");
|
||||
snprintf (_fn, sizeof (_fn), "%s.0x%08"PFMT64x, prefix, core->offset);
|
||||
|
Loading…
x
Reference in New Issue
Block a user