diff options
author | mbr <mbr@FreeBSD.org> | 2004-10-12 19:46:24 +0800 |
---|---|---|
committer | mbr <mbr@FreeBSD.org> | 2004-10-12 19:46:24 +0800 |
commit | 3ad2bb272dafd59690afc40dfbc458f7b2fc166f (patch) | |
tree | 82d1935e407bebdd9d46fc35887b5e3147c2cfca /mail | |
parent | a743724285bd838b49dd939f54fe697aafb54306 (diff) | |
download | freebsd-ports-gnome-3ad2bb272dafd59690afc40dfbc458f7b2fc166f.tar.gz freebsd-ports-gnome-3ad2bb272dafd59690afc40dfbc458f7b2fc166f.tar.zst freebsd-ports-gnome-3ad2bb272dafd59690afc40dfbc458f7b2fc166f.zip |
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.
Diffstat (limited to 'mail')
-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 + ) { |