core/cmd_debug: fix OOB read when running 'dcu' (#745)

This commit is contained in:
Riccardo Schirone 2021-03-01 19:59:28 +01:00 committed by GitHub
parent 8a69088719
commit fa2028e171
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4182,7 +4182,7 @@ RZ_IPI int rz_debug_continue_oldhandler(void *data, const char *input) {
case 'u': // "dcu"
if (input[1] == '?') {
rz_core_cmd_help(core, help_msg_dcu);
} else if (input[1] == '.') {
} else if (input[1] == '.' || input[1] == '\0') {
cmd_dcu(core, "cu $$");
} else {
char *tmpinp = rz_str_newf("cu %s", input + 2);