Commit a581fd70 a581fd705a7b02496053c695b26a04b0f286aa74 by Sergey Poznyakoff

(mh_context_read): Avoid writing past blurb end.

1 parent 533440a9
...@@ -116,13 +116,13 @@ mh_context_read (mh_context_t *ctx) ...@@ -116,13 +116,13 @@ mh_context_read (mh_context_t *ctx)
116 if (!*q || *q == '#') 116 if (!*q || *q == '#')
117 continue; 117 continue;
118 118
119 while ((*p = *q++)) 119 while (*q)
120 p++; 120 *p++ = *q++;
121 } 121 }
122 fclose (fp); 122 fclose (fp);
123 123
124 if ((status = mu_header_create (&ctx->header, blurb, p - blurb, NULL)) != 0) 124 status = mu_header_create (&ctx->header, blurb, p - blurb, NULL);
125 free (blurb); 125 free (blurb);
126 126
127 return status; 127 return status;
128 } 128 }
......