Fix buffer size of ALIGNed buffer.
PR: bin/20053 Submitted by: Alex Kapranoff <alex@kapran.bitmcnit.bryansk.su>
This commit is contained in:
parent
aa73302b03
commit
c847fdb1f9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=63662
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user