mirror of
https://github.com/chatmail/core.git
synced 2026-05-05 06:16:30 +03:00
audit use of to_cstring and fix ub
This commit is contained in:
committed by
holger krekel
parent
618087e5a7
commit
c68e7ae14e
@@ -99,7 +99,9 @@ unsafe fn dc_job_perform(context: &Context, thread: libc::c_int, probe_network:
|
||||
};
|
||||
|
||||
let packed: String = row.get(3)?;
|
||||
dc_param_set_packed(job.param, to_cstring(packed).as_ptr());
|
||||
let packed_c = to_cstring(packed);
|
||||
dc_param_set_packed(job.param, packed_c);
|
||||
free(packed_c as *mut _);
|
||||
info!(context, 0, "DONE jobs query_maps row");
|
||||
Ok(job)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user