diff options
author | Not Zed <NotZed@Ximian.com> | 2004-04-02 17:23:46 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-04-02 17:23:46 +0800 |
commit | f739cc56ee5d8cbf878ea2cd232b1d93ec9d2766 (patch) | |
tree | 833bae4993b97779ca7d348f3333ad979bc9d066 /mail | |
parent | e2333fc944f7712b79286e72354ed0259545cb2d (diff) | |
download | gsoc2013-evolution-f739cc56ee5d8cbf878ea2cd232b1d93ec9d2766.tar gsoc2013-evolution-f739cc56ee5d8cbf878ea2cd232b1d93ec9d2766.tar.gz gsoc2013-evolution-f739cc56ee5d8cbf878ea2cd232b1d93ec9d2766.tar.bz2 gsoc2013-evolution-f739cc56ee5d8cbf878ea2cd232b1d93ec9d2766.tar.lz gsoc2013-evolution-f739cc56ee5d8cbf878ea2cd232b1d93ec9d2766.tar.xz gsoc2013-evolution-f739cc56ee5d8cbf878ea2cd232b1d93ec9d2766.tar.zst gsoc2013-evolution-f739cc56ee5d8cbf878ea2cd232b1d93ec9d2766.zip |
do a per-line validation of the uuencoded stuff, based on the length byte.
2004-04-02 Not Zed <NotZed@Ximian.com>
* em-inline-filter.c: do a per-line validation of the uuencoded
stuff, based on the length byte.
svn path=/trunk/; revision=25297
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 3 | ||||
-rw-r--r-- | mail/em-inline-filter.c | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 51fe50a9bd..25511a491b 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,8 @@ 2004-04-02 Not Zed <NotZed@Ximian.com> + * em-inline-filter.c: do a per-line validation of the uuencoded + stuff, based on the length byte. + ** See bug #56338. * em-format-html.c (emfh_gethttp): fix the fugly "load http if" diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c index fc3752fef5..1144cff503 100644 --- a/mail/em-inline-filter.c +++ b/mail/em-inline-filter.c @@ -224,6 +224,23 @@ emif_scan(CamelMimeFilter *f, char *in, size_t len, int final) emif_add_part(emif, data_start, inptr-data_start); data_start = inptr; emif->state = EMIF_PLAIN; + } else { + int len, linelen; + + /* check the length byte matches the data, if not, output what we have and re-scan this line */ + len = ((start[0] - ' ') & 077) * 4 / 3; + linelen = inptr-start-1; + while (linelen > 0 && (start[linelen] == '\r' || start[linelen] == '\n')) + linelen--; + linelen--; + if (linelen != len) { + inptr[-1] = '\n'; + emif_add_part(emif, data_start, start-data_start); + data_start = start; + inptr = start; + emif->state = EMIF_PLAIN; + continue; + } } break; case EMIF_BINHEX: |