Skip to content
Snippets Groups Projects
Commit bcacdd92 authored by Leon Weiss's avatar Leon Weiss
Browse files

Don't use a buffer of fixed size

parent c88cf40c
No related branches found
No related tags found
1 merge request!47Improve jump table detection and debugging output
Pipeline #24954 passed
......@@ -9,10 +9,9 @@ static void assemblestr(ks_engine * &ks, IRDB_SDK::Instruction_t *ins, const cha
auto error = ks_errno(ks);
ks_free((unsigned char*)encode);
ks_close(ks);
char msg[250];
snprintf(msg, sizeof msg,
"ERROR: ks_asm() failed during instruction assembly. (instruction=%s, count=%zu, error=%s)",
instruct, count, ks_strerror(error));
auto msg =
string("ERROR: ks_asm() failed during instruction assembly. (instruction='") +
instruct + "', count=" + to_string(count) + ", error='" + ks_strerror(error) + "')";
throw std::runtime_error(msg);
}
else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment