diff options
author | Martin Blapp <mbr@FreeBSD.org> | 2004-10-12 11:46:24 +0000 |
---|---|---|
committer | Martin Blapp <mbr@FreeBSD.org> | 2004-10-12 11:46:24 +0000 |
commit | fb4e9df2cd8e3143f1be53be77c4f60daeb5c660 (patch) | |
tree | 33b4d58b3a036641fd0ab50f4c858a9c78bf8bf7 /mail/razor-agents | |
parent | Maintainer update: efax-gtk 2.2.11 (diff) |
Fix segfault which happens with long HTML documents. There are some
missing boundary checks somewhere. This patch works aound this and
terminates the mail properly at the end of the html part.
Checksums on a patched and unpatched razor are still the same.
We run this patch now over two months and everything is working fine.
Notes
Notes:
svn path=/head/; revision=118965
Diffstat (limited to 'mail/razor-agents')
-rw-r--r-- | mail/razor-agents/Makefile | 2 | ||||
-rw-r--r-- | mail/razor-agents/files/patch-deHTML-segfault | 33 |
2 files changed, 34 insertions, 1 deletions
diff --git a/mail/razor-agents/Makefile b/mail/razor-agents/Makefile index d7bd949573ba..2e61dbe70e90 100644 --- a/mail/razor-agents/Makefile +++ b/mail/razor-agents/Makefile @@ -7,7 +7,7 @@ PORTNAME= razor-agents PORTVERSION= 2.61 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= mail MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= razor diff --git a/mail/razor-agents/files/patch-deHTML-segfault b/mail/razor-agents/files/patch-deHTML-segfault new file mode 100644 index 000000000000..5c7426c13f45 --- /dev/null +++ b/mail/razor-agents/files/patch-deHTML-segfault @@ -0,0 +1,33 @@ +--- Razor2-Preproc-deHTMLxs/_deHTMLxs.c Thu Jun 17 00:44:35 2004 ++++ Razor2-Preproc-deHTMLxs/_deHTMLxs.c Sun Aug 1 09:48:54 2004 +@@ -177,13 +177,17 @@ + break; + + case '&': +- *t++ = html_tagxlat(&s); ++ if (t != NULL) ++ *t++ = html_tagxlat(&s); + break; + + default: + valid: +- if (!tag) +- *t++ = c; ++ if (!tag) { ++ if (t != NULL ) { ++ *t++ = c; ++ } ++ } + break; + } + +--- Razor2-Preproc-deHTMLxs/deHTMLxs.xs Sun Aug 1 13:55:03 2004 ++++ Razor2-Preproc-deHTMLxs/deHTMLxs.xs Sun Aug 1 13:52:28 2004 +@@ -191,6 +191,7 @@ + text = SvRV(scalarref); + raw = SvPV(text,size); + ++ *(raw + size - 1) = '\0'; + if ( (cleaned = malloc(size+1)) && + (res = html_strip(raw, cleaned)) // html_strip will memset cleaned to 0 + ) { |