Fix buffer size of ALIGNed buffer.

PR:		bin/20053
Submitted by:	Alex Kapranoff <alex@kapran.bitmcnit.bryansk.su>
This commit is contained in:
Hajimu UMEMOTO 2000-07-20 14:54:04 +00:00
parent aa73302b03
commit c847fdb1f9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=63662
3 changed files with 6 additions and 6 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;
}

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;
}

View File

@ -2859,7 +2859,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;
@ -2901,7 +2901,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;
}