Fix buffer size of ALIGNed buffer.

PR:		bin/20053
Submitted by:	Alex Kapranoff <alex@kapran.bitmcnit.bryansk.su>


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@63662 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This commit is contained in:
ume 2000-07-20 14:54:04 +00:00
parent 4bd1ed896a
commit a2af2980e2
1 changed files with 2 additions and 2 deletions

View File

@ -3038,7 +3038,7 @@ sourceroute(ai, arg, cpp, lenp, protop, optp)
int *protop;
int *optp;
{
static char buf[1024]; /*XXX*/
static char buf[1024 + ALIGNBYTES]; /*XXX*/
struct cmsghdr *cmsg;
#ifdef sysV88
static IOPTN ipopt;
@ -3080,7 +3080,7 @@ sourceroute(ai, arg, cpp, lenp, protop, optp)
lsrp = *cpp;
ep = lsrp + *lenp;
} else {
*cpp = lsrp = ALIGN(buf);
*cpp = lsrp = (char *)ALIGN(buf);
ep = lsrp + 1024;
}