Import old rinetd 0.62.

Taken from the Debian archive:
  http://archive.debian.org/debian/pool/main/r/rinetd/
This commit is contained in:
Sam Hocevar 2016-01-10 20:54:24 +01:00
parent e6552ce4fa
commit 1c95abb27d
5 changed files with 19 additions and 5 deletions

View File

@ -46,3 +46,10 @@ functional consequences were corrected.
Version 0.61: fixed a bug in 0.6 which completely
broke rinetd under Linux. Oops.
Version 0.62: fixed a potential buffer overrun;
prior versions failed to reallocate one of the
arrays correctly when reallocating memory to
accommodate more connections. Thanks to
Sam Hocevar.

2
README
View File

@ -1,4 +1,4 @@
rinetd version 0.61, by Thomas Boutell. Released under
rinetd version 0.62, by Thomas Boutell. Released under
the terms of the GNU General Public License, version 2 or later.
This program is used to efficiently redirect connections

View File

@ -26,7 +26,9 @@ rinetd -- internet ``redirection server''
<p>
<font color="#FF8888" size="4">VERSION</font>
<p>
Version 0.61, 3/1/1999.
Version 0.62, 04/13/2003. Version 0.62 corrects a potential
buffer overflow when reallocating memory to accommodate more
connections. Upgrading is strongly recommended.
<p>
<font color="#FF8888" size="4">WHERE TO GET</font>
<p>

View File

@ -12,7 +12,7 @@
.Sh SYNOPSIS
.Nm /usr/sbin/rinetd
.Sh VERSION
Version 0.61, 3/1/1999.
Version 0.62, 04/14/2003.
.Sh DESCRIPTION
.Nm rinetd
redirects TCP connections from one IP address and port to another. rinetd

View File

@ -1,4 +1,4 @@
#define VERSION "0.61"
#define VERSION "0.62"
#ifdef WIN32
#include <windows.h>
@ -1071,6 +1071,11 @@ void handleAccept(int i)
{
goto shortage;
}
if (!SAFE_REALLOC(&coClosing, sizeof(int) * o,
sizeof(int) * coTotal))
{
goto shortage;
}
if (!SAFE_REALLOC(&reClosed, sizeof(int) * o,
sizeof(int) * coTotal))
{
@ -1140,7 +1145,7 @@ void handleAccept(int i)
goto shortage;
}
}
index = coTotal;
index = o;
}
coInputRPos[index] = 0;
coInputWPos[index] = 0;