mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 10:56:11 +00:00
Fix null deref in strings loading without any file (#2955)
This commit is contained in:
parent
a630a8f5bc
commit
2e6fd46127
@ -542,10 +542,7 @@ CutterJson CutterCore::cmdjTask(const QString &str)
|
||||
RizinCmdTask task(str);
|
||||
task.startTask();
|
||||
task.joinTask();
|
||||
const char *res = task.getResultRaw();
|
||||
char *copy = static_cast<char *>(rz_mem_alloc(strlen(res) + 1));
|
||||
strcpy(copy, res);
|
||||
return parseJson(copy, str);
|
||||
return task.getResultJson();
|
||||
}
|
||||
|
||||
CutterJson CutterCore::parseJson(char *res, const char *cmd)
|
||||
|
Loading…
Reference in New Issue
Block a user