Skip to content

Commit

Permalink
Fix null deref in codemeta_new
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Nov 21, 2024
1 parent 2eb886f commit e1426b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/Decompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ RCodeMeta *R2DecDecompiler::decompileSync(RVA addr)
}
// note that r2dec doesnt have the "text" object like pdc does. so we cant
// reuse code
RCodeMeta *code = r_codemeta_new(nullptr);
RCodeMeta *code = r_codemeta_new("");
QString codeString = "";
for (const auto line : json["log"].toArray()) {
if (!line.isString()) {
Expand Down Expand Up @@ -91,7 +91,7 @@ void R2DecDecompiler::decompileAt(RVA addr)
emit finished(Decompiler::makeWarning(tr("Failed to parse JSON from r2dec")));
return;
}
RCodeMeta *code = r_codemeta_new(nullptr);
RCodeMeta *code = r_codemeta_new("");
QString codeString = "";
for (const auto line : json["log"].toArray()) {
if (!line.isString()) {
Expand Down

0 comments on commit e1426b1

Please sign in to comment.