diff --git a/www/hypermail/Makefile b/www/hypermail/Makefile index 28c023683bf6..c4e7700a519b 100644 --- a/www/hypermail/Makefile +++ b/www/hypermail/Makefile @@ -1,45 +1,45 @@ # Created by: mjhsieh PORTNAME= hypermail PORTVERSION= 2.4.0 DISTVERSIONPREFIX= v -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= www mail MAINTAINER= bapt@FreeBSD.org COMMENT= Program to generate a cross-referenced HTML mail archive LICENSE= GPLv2 LIB_DEPENDS+= libpcre.so:devel/pcre \ libtrio.so:devel/trio USES= localbase iconv desthack USE_GITHUB= yes GH_ACCOUNT= hypermail-project GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-htmldir=${STAGEDIR}${PREFIX}/share/doc/hypermail \ --with-external-pcre=${LOCALBASE}/bin/pcre-config \ --enable-system-libtrio CONFIGURE_ENV+= CFLAGS="${CFLAGS} -L${LOCALBASE}/lib" MAKE_ARGS= INSTALL_PROG=${INSTALL} OPTIONS_DEFINE= DOCS GDBM OPTIONS_DEFAULT= GDBM GDBM_DESC= Support incremental updates GDBM_CONFIGURE_WITH= -with-gdbm=${LOCALBASE} GDBM_CONFIGURE_OFF= --without-gdbm GDBM_LIB_DEPENDS= libgdbm.so:databases/gdbm post-install: ${STRIP_CMD} ${STAGEDIR}/${PREFIX}/bin/hypermail \ ${STAGEDIR}/${PREFIX}/bin/msg2archive \ ${STAGEDIR}/${PREFIX}/bin/rdmsg .include diff --git a/www/hypermail/files/patch-memory-fixes b/www/hypermail/files/patch-memory-fixes new file mode 100644 index 000000000000..8e4df362ea77 --- /dev/null +++ b/www/hypermail/files/patch-memory-fixes @@ -0,0 +1,60 @@ +diff --git src/parse.c src/parse.c +index 36da5df..679514c 100644 +--- src/parse.c ++++ src/parse.c +@@ -924,7 +924,7 @@ static char *mdecodeRFC2047(char *string, int length, char *charsetsave) + char charset[129]; + char encoding[33]; + char dummy[129]; +- char *ptr; ++ char *ptr, *endptr; + char *old_output; + + #ifdef NOTUSED +@@ -959,6 +959,7 @@ static char *mdecodeRFC2047(char *string, int length, char *charsetsave) + + if (!strcasecmp("q", encoding)) { + /* quoted printable decoding */ ++ endptr = ptr + strlen(ptr); + + #ifdef HAVE_ICONV + char *orig2,*output2,*output3; +@@ -967,7 +968,7 @@ static char *mdecodeRFC2047(char *string, int length, char *charsetsave) + memset(output2,0,strlen(string)+1); + old_output=output; + +- for (; *ptr; ptr++) { ++ for (; ptr < endptr; ptr++) { + switch (*ptr) { + case '=': + sscanf(ptr + 1, "%02X", &value); +@@ -991,7 +992,7 @@ static char *mdecodeRFC2047(char *string, int length, char *charsetsave) + memcpy(charsetsave,charset,charsetlen); + charsetsave[charsetlen] = '\0'; + #else +- for (; *ptr; ptr++) { ++ for (; ptr < endptr; ptr++) { + switch (*ptr) { + case '=': + sscanf(ptr + 1, "%02X", &value); +@@ -2378,6 +2379,7 @@ int parsemail(char *mbox, /* file name */ + #endif + if (charset) { + free(charset); ++ charset = NULL; + } + charsetsave[0] = '\0'; + +diff --git src/uudecode.c src/uudecode.c +index 4b4310d..f5a7c20 100644 +--- src/uudecode.c ++++ src/uudecode.c +@@ -75,7 +75,7 @@ int uudecode(FILE *input, /* get file data from (if needed) */ + if (init) { + /* search for header line */ + /* AUDIT biege: BOF in buf! */ +- sprintf(scanfstring, "begin %%o %%%us", sizeof(buf)); ++ sprintf(scanfstring, "begin %%o %%%us", sizeof(buf) -1); + while (2 != sscanf(iptr, scanfstring, &mode, buf)) { + if (!fgets(buf, MAXPATHLEN, input)) { + return 2;