Closed XVilka closed 6 months ago
Currently Rizin uses
sdb_fmt
function, often as an argument that could cause a leak
I think this is not true. sdb_fmt
gets string from the stack, so they cannot leak. However, sdb_fmt
has its own problems indeed, because you don't have control over the used buffers. The direct replacement for sdb_fmt
should be rz_strf
which still uses stack-allocated buffers.
rz_str_*
and rz_strbuf_*
usually allocates things on the stack and sometimes you don't need to waste time on that.
Currently Rizin uses
sdb_fmt
function, which uses global state and is thread-unsafe. I suggest substituting all calls of it with the Rizin API like:rz_strf
rz_str_new[f]()
rz_strbuf_append[f]()
rz_asm_op_setf_asm()