Dr. Werner Fink 2016-04-08 15:03:57 +00:00 committed by Git OBS Bridge
parent 179b617c8e
commit 70fc98293d
2 changed files with 23 additions and 16 deletions

View File

@ -1,5 +1,11 @@
---
def.h | 4 +
mime.c | 144 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
sendout.c | 40 +++++++++++++----
3 files changed, 172 insertions(+), 16 deletions(-)
--- def.h
+++ def.h 2012-03-23 13:57:44.000000000 +0000
+++ def.h 2016-04-08 14:58:42.729798789 +0000
@@ -142,7 +142,9 @@ enum mimeclean {
MIME_LONGLINES = 002, /* has lines too long for RFC 2822 */
MIME_CTRLCHAR = 004, /* contains control characters */
@ -12,7 +18,7 @@
enum tdflags {
--- mime.c
+++ mime.c 2013-07-02 10:25:35.000000000 +0000
+++ mime.c 2016-04-08 15:00:05.808259514 +0000
@@ -302,13 +302,78 @@ gettcharset(void)
return t;
}
@ -101,7 +107,7 @@
if (w & GIDENT) {
if (hp->h_from && name_highbit(hp->h_from))
goto needs;
@@ -355,7 +422,7 @@ need_hdrconv(struct header *hp, enum gfi
@@ -355,7 +421,7 @@ need_hdrconv(struct header *hp, enum gfi
if (w & GSUBJECT && has_highbit(hp->h_subject))
goto needs;
return NULL;
@ -128,7 +134,7 @@
match = 1;
break;
}
@@ -748,16 +814,66 @@ mime_isclean(FILE *f)
@@ -748,14 +814,62 @@ mime_isclean(FILE *f)
maxlen = curlen;
curlen = 1;
} else if (c & 0200) {
@ -172,10 +178,8 @@
+ continue;
+ }
+ latin:
+ if (text_chars[i & 0377] == I) {
+ if (text_chars[i & 0377] == I)
+ isclean |= MIME_LATIN;
+ continue;
+ }
+ if (text_chars[i & 0377] == X) {
+ isclean |= MIME_CTRLCHAR;
+ break;
@ -189,14 +193,12 @@
+ break;
}
} while (c != EOF);
if (lastc != '\n')
isclean |= MIME_NOTERMNL;
+ if (isclean & (MIME_CTRLCHAR|MIME_HASNUL))
+ isclean &= (MIME_CTRLCHAR|MIME_HASNUL);
if (lastc != '\n')
isclean |= MIME_NOTERMNL;
clearerr(f);
fseek(f, initial_pos, SEEK_SET);
if ((cp = value("maximum-unencoded-line-length")) != NULL)
@@ -826,11 +942,16 @@ get_mime_convert(FILE *fp, char **conten
@@ -826,11 +940,16 @@ get_mime_convert(FILE *fp, char **conten
* ^I or ^L in text/plain bodies. However, some
* obscure character sets actually contain these
* characters, so the content type can be set.
@ -213,7 +215,7 @@
}
return convert;
}
@@ -989,8 +1110,14 @@ mime_fromhdr(struct str *in, struct str
@@ -989,8 +1108,14 @@ mime_fromhdr(struct str *in, struct str
#ifdef HAVE_ICONV
iconv_t fhicd = (iconv_t)-1;
#endif
@ -228,7 +230,7 @@
maxstor = in->l;
out->s = smalloc(maxstor + 1);
out->l = 0;
@@ -1010,7 +1137,7 @@ mime_fromhdr(struct str *in, struct str
@@ -1010,7 +1135,7 @@ mime_fromhdr(struct str *in, struct str
#ifdef HAVE_ICONV
if (fhicd != (iconv_t)-1)
iconv_close(fhicd);
@ -237,7 +239,7 @@
fhicd = iconv_open_ft(tcs, cs);
else
fhicd = (iconv_t)-1;
@@ -1105,12 +1232,17 @@ notmime:
@@ -1105,12 +1230,17 @@ notmime:
}
fromhdr_end:
*q = '\0';
@ -257,7 +259,7 @@
out->l = delctrl(out->s, out->l);
#ifdef HAVE_ICONV
--- sendout.c
+++ sendout.c 2012-03-23 18:30:50.949933289 +0000
+++ sendout.c 2016-04-08 14:58:42.729798789 +0000
@@ -226,6 +226,23 @@ attach_file1(struct attachment *ap, FILE
charset = ap->a_charset;
convert = get_mime_convert(fi, &contenttype, &charset, &isclean,

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Apr 8 15:02:17 UTC 2016 - werner@suse.de
- Correct parenthese expansion to fulfill natural order (bnc#974561)
-------------------------------------------------------------------
Tue Mar 17 10:05:20 UTC 2015 - werner@suse.de