Commit cf431d85 cf431d85b28662f883e1960f164579df8b01436e by Sergey Poznyakoff

message_stream: Bugfix

* libmailutils/stream/message_stream.c (copy_trimmed_value): Fix
memory allocation.
1 parent feee0bbf
......@@ -138,7 +138,7 @@ copy_trimmed_value (const char *str)
str = mu_str_skip_class (str, MU_CTYPE_SPACE);
len = strlen (str) - 1;
p = malloc (len);
p = malloc (len + 1);
memcpy (p, str, len);
p[len] = 0;
return p;
......