fix: improve some string handling in the message recieve path

This commit is contained in:
dignifiedquire
2019-08-07 22:20:00 +02:00
parent 2414a618e2
commit 6772d6f66c
4 changed files with 186 additions and 102 deletions

View File

@@ -29,6 +29,10 @@ impl dc_simplify_t {
is_html: libc::c_int,
is_msgrmsg: libc::c_int,
) -> *mut libc::c_char {
if in_bytes <= 0 {
return "".strdup();
}
/* create a copy of the given buffer */
let mut out: *mut libc::c_char;
let mut temp: *mut libc::c_char;