Bugfix in libstream
* libmailutils/stream/message_stream.c (_message_open): Don't clobber len.
Showing
1 changed file
with
4 additions
and
4 deletions
... | @@ -180,12 +180,12 @@ _message_open (mu_stream_t stream) | ... | @@ -180,12 +180,12 @@ _message_open (mu_stream_t stream) |
180 | 180 | ||
181 | if (p) | 181 | if (p) |
182 | { | 182 | { |
183 | len = p - s; | 183 | size_t n = p - s; |
184 | env_from = mu_alloc (len + 1); | 184 | env_from = mu_alloc (n + 1); |
185 | if (!env_from) | 185 | if (!env_from) |
186 | return ENOMEM; | 186 | return ENOMEM; |
187 | memcpy (env_from, s, len); | 187 | memcpy (env_from, s, n); |
188 | env_from[len] = 0; | 188 | env_from[n] = 0; |
189 | env_date = mu_strdup (p + 1); | 189 | env_date = mu_strdup (p + 1); |
190 | if (!env_date) | 190 | if (!env_date) |
191 | { | 191 | { | ... | ... |
-
Please register or sign in to post a comment