1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

- Fix a buffer overflow [1]

- Fix installation while I'm here

PR:		ports/114327 (based on)
Submitted by:	Bartek Rutkowski <r@robakdesign.com> (maintainer)
Obtained from:	jGGtrans SVN [1]
Security:	http://jggtrans.jajcus.net/trac/changeset/694
This commit is contained in:
Andrew Pantyukhin 2007-07-20 10:04:53 +00:00
parent cac5744ca7
commit 6795d530d4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=195941
2 changed files with 14 additions and 4 deletions

View File

@ -6,7 +6,7 @@
PORTNAME= jggtrans
PORTVERSION= 2.2.2
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net-im polish
MASTER_SITES= http://jggtrans.jajcus.net/downloads/ \
http://freebsd.e.pl/distfiles/
@ -28,8 +28,6 @@ MAKE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
USE_RC_SUBR= jggtrans.sh
USE_LDCONFIG= yes
OPTIONS= NODEBUG "Turn off debugging code" off \
EJABBERD "Use transport with ejabberd" off
@ -50,7 +48,8 @@ SUB_LIST+= JABBER_REQUIRE=jabberd
SUB_LIST+= JABBER_USER=${JABBER_USER}
post-install:
@if [ ! -f ${PREFIX}/etc/jggtrans.xml ]; then ${CP} -p ${WRKSRC}/jggtrans.xml ${PREFIX}/etc/jggtrans.xml.sample ; fi
@${INSTALL_DATA} ${WRKSRC}/jggtrans.xml ${PREFIX}/etc/jggtrans.xml.sample
@${CP} -n ${WRKSRC}/jggtrans.xml ${PREFIX}/etc/jggtrans.xml
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

View File

@ -0,0 +1,11 @@
--- ./src/encoding.c.orig 2007-07-20 13:49:39.000000000 +0400
+++ ./src/encoding.c 2007-07-20 13:50:00.000000000 +0400
@@ -97,7 +97,7 @@
int i;
if (str==NULL) return NULL;
- if (buf_len<(strlen(str)+1)){
+ if (buf_len<(strlen(str)*2+1)){
buf_len=strlen(str)*2+1; /* this should always be enough */
buf=(char *)g_realloc(buf,buf_len);
assert(buf!=NULL);