Commit 167fcea0 authored by antma's avatar antma

fix free in the hypotetic case when binlog message contain NUL character in the middle

parent 989d6de6
......@@ -1327,6 +1327,7 @@ void fetch_geo_message (struct message *M) {
fetch_message_action (&M->action);
} else {
M->message = fetch_str_dup ();
M->message_len = strlen (M->message);
fetch_message_media (&M->media);
}
}
......@@ -1691,7 +1692,7 @@ void free_message_action (struct message_action *M) {
void free_message (struct message *M) {
if (!M->service) {
if (M->message) { tfree_str (M->message); }
if (M->message) { tfree (M->message, M->message_len + 1); }
free_message_media (&M->media);
} else {
free_message_action (&M->action);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment