From 7e93dee44df1a7e8f551a2e408a600b2e90a0974 Mon Sep 17 00:00:00 2001 From: Philipp Takacs Date: Sun, 17 Sep 2023 18:35:35 +0200 Subject: [PATCH] mhl and mhbuild ignore to long lines --- test/tests/show/test-longlines | 12 ++++++++++-- uip/mhbuild.c | 3 ++- uip/mhl.c | 3 ++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/test/tests/show/test-longlines b/test/tests/show/test-longlines index f6ae126..54e8616 100644 --- a/test/tests/show/test-longlines +++ b/test/tests/show/test-longlines @@ -105,7 +105,11 @@ EOF # check it cat > $expected <<-EOF -mhl: format error in message 13 +Date: Sun, 15 Jul 2018 12:26:59 +0200 +From: foo@example.edu +To: bar@example.edu +Subject: 999 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + part text/plain 4 foo EOF diff --git a/uip/mhbuild.c b/uip/mhbuild.c index c032022..f9674a3 100644 --- a/uip/mhbuild.c +++ b/uip/mhbuild.c @@ -350,6 +350,8 @@ build_mime(char *infile) */ for (compnum = 1, state = FLD2;;) { switch (state = m_getfld2(state, &f, in)) { + case LENERR2: + state = FLD2; case FLD2: compnum++; @@ -384,7 +386,6 @@ build_mime(char *infile) adios(EX_CONFIG, NULL, "draft has empty body -- no directives!"); /* NOTREACHED */ - case LENERR2: case FMTERR2: case IOERR2: adios(EX_CONFIG, NULL, "message format error in component #%d", diff --git a/uip/mhl.c b/uip/mhl.c index fa83602..dd77f5b 100644 --- a/uip/mhl.c +++ b/uip/mhl.c @@ -654,6 +654,8 @@ mhlfile(FILE *fp, char *mname, int ofilen, int ofilec) for (state = FLD2; !eflag; ) { switch (state = m_getfld2(state, &f, fp)) { + case LENERR2: + state = FLD2; case FLD2: for (ip = ignores; *ip; ip++) if (simplematch(*ip, f.name)) { @@ -729,7 +731,6 @@ mhlfile(FILE *fp, char *mname, int ofilen, int ofilec) } return; - case LENERR2: case FMTERR2: case IOERR2: advise(NULL, "format error in message %s", mname); -- 1.7.10.4