1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-22 20:41:26 +00:00

patch around crashes for hostnames longer than 15 characters

PR:		ports/30159
Approved by:	chris@aims.com.au	(maintainer)
This commit is contained in:
Assar Westerlund 2001-08-28 13:47:15 +00:00
parent c4703a4046
commit def9cc8a25
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=47021
4 changed files with 26 additions and 0 deletions

View File

@ -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:<endian.h>:<machine/endian.h>:g' ${WRKSRC}/rdesktop.h
@${PATCH} ${PATCH_ARGS} < files/patch-aa
.include <bsd.port.mk>

View File

@ -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);

View File

@ -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:<endian.h>:<machine/endian.h>:g' ${WRKSRC}/rdesktop.h
@${PATCH} ${PATCH_ARGS} < files/patch-aa
.include <bsd.port.mk>

View File

@ -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);