summaryrefslogtreecommitdiff
path: root/mh
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2003-03-24 15:18:37 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2003-03-24 15:18:37 +0000
commit431506466774567083c52a2cf5f9517aa1671826 (patch)
treec5c838e64d228d2325e0b54ac64bc63b0df7cca7 /mh
parente526dcb720b50b9b7e36992bd660a24db4ef606d (diff)
downloadmailutils-431506466774567083c52a2cf5f9517aa1671826.tar.gz
mailutils-431506466774567083c52a2cf5f9517aa1671826.tar.bz2
(stream_getline,parse_content_type): A couple of bugfixes.
Diffstat (limited to 'mh')
-rw-r--r--mh/mhn.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mh/mhn.c b/mh/mhn.c
index 6903871e2..70775b168 100644
--- a/mh/mhn.c
+++ b/mh/mhn.c
@@ -1593,7 +1593,7 @@ stream_getline (stream_t str, char **buf, size_t *bufsize, size_t *pnum)
numread += n;
if ((*buf)[numread - 1] != '\n')
{
- if (numread == *bufsize)
+ if (numread + 1 == *bufsize)
{
*bufsize += 128;
*buf = xrealloc (*buf, *bufsize);
@@ -1660,9 +1660,10 @@ parse_content_type (struct compose_env *env,
char *rest = *prest;
char *sp;
char *comment = NULL;
-
+
while (stop == 0 && status == 0 && *rest)
{
+ skipws (rest);
switch (*rest++)
{
case '(':
@@ -1742,7 +1743,6 @@ parse_content_type (struct compose_env *env,
stop = 1;
break;
}
- skipws (rest);
}
if (comment)
@@ -1849,7 +1849,7 @@ edit_extern (char *cmd, struct compose_env *env, message_t *msg, int level)
body_t body;
stream_t in, out = NULL;
struct obstack stk;
-
+
if (!*msg)
message_create (msg, NULL);
@@ -1883,7 +1883,7 @@ edit_extern (char *cmd, struct compose_env *env, message_t *msg, int level)
id = mh_create_message_id (env->subpart);
header_set_value (hdr2, MU_HEADER_CONTENT_ID, id, 1);
free (id);
-
+
header_get_stream (hdr2, &in);
stream_seek (in, 0, SEEK_SET);
cat_message (out, in);

Return to:

Send suggestions and report system problems to the System administrator.