From def9cc8a256c9bd105c215eb65f11f80e11b5a8e Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Tue, 28 Aug 2001 13:47:15 +0000 Subject: [PATCH] patch around crashes for hostnames longer than 15 characters PR: ports/30159 Approved by: chris@aims.com.au (maintainer) --- net/rdesktop-devel/Makefile | 1 + net/rdesktop-devel/files/patch-aa | 12 ++++++++++++ net/rdesktop/Makefile | 1 + net/rdesktop/files/patch-aa | 12 ++++++++++++ 4 files changed, 26 insertions(+) create mode 100644 net/rdesktop-devel/files/patch-aa create mode 100644 net/rdesktop/files/patch-aa diff --git a/net/rdesktop-devel/Makefile b/net/rdesktop-devel/Makefile index 24663f9decac..6982e3673e78 100644 --- a/net/rdesktop-devel/Makefile +++ b/net/rdesktop-devel/Makefile @@ -35,5 +35,6 @@ do-patch: @${PERL} -pi.orig -e 's:^install.*:install\: rdesktop:g' ${WRKSRC}/Makefile @${PERL} -pi.orig -e 's:^.*\(INSTALL\) rdp-srvr.*::g' ${WRKSRC}/Makefile @${PERL} -pi.orig -e 's:::g' ${WRKSRC}/rdesktop.h + @${PATCH} ${PATCH_ARGS} < files/patch-aa .include diff --git a/net/rdesktop-devel/files/patch-aa b/net/rdesktop-devel/files/patch-aa new file mode 100644 index 000000000000..e9b7e1fb54eb --- /dev/null +++ b/net/rdesktop-devel/files/patch-aa @@ -0,0 +1,12 @@ +--- secure.c~ Mon Aug 27 16:33:56 2001 ++++ secure.c Mon Aug 27 16:36:19 2001 +@@ -387,6 +387,9 @@ + { + int hostlen = 2 * ( hostname == 0 ? 0 : strlen (hostname)); + ++ if (hostlen > 30) ++ hostlen = 30; ++ + out_uint16_be (s, 5); /* unknown */ + out_uint16_be (s, 0x14); + out_uint8 (s, 0x7c); diff --git a/net/rdesktop/Makefile b/net/rdesktop/Makefile index 24663f9decac..6982e3673e78 100644 --- a/net/rdesktop/Makefile +++ b/net/rdesktop/Makefile @@ -35,5 +35,6 @@ do-patch: @${PERL} -pi.orig -e 's:^install.*:install\: rdesktop:g' ${WRKSRC}/Makefile @${PERL} -pi.orig -e 's:^.*\(INSTALL\) rdp-srvr.*::g' ${WRKSRC}/Makefile @${PERL} -pi.orig -e 's:::g' ${WRKSRC}/rdesktop.h + @${PATCH} ${PATCH_ARGS} < files/patch-aa .include diff --git a/net/rdesktop/files/patch-aa b/net/rdesktop/files/patch-aa new file mode 100644 index 000000000000..e9b7e1fb54eb --- /dev/null +++ b/net/rdesktop/files/patch-aa @@ -0,0 +1,12 @@ +--- secure.c~ Mon Aug 27 16:33:56 2001 ++++ secure.c Mon Aug 27 16:36:19 2001 +@@ -387,6 +387,9 @@ + { + int hostlen = 2 * ( hostname == 0 ? 0 : strlen (hostname)); + ++ if (hostlen > 30) ++ hostlen = 30; ++ + out_uint16_be (s, 5); /* unknown */ + out_uint16_be (s, 0x14); + out_uint8 (s, 0x7c);