summaryrefslogtreecommitdiffstats
path: root/usr.bin/telnet
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2000-07-20 14:54:04 +0000
committerume <ume@FreeBSD.org>2000-07-20 14:54:04 +0000
commit0abc0cfcd6efa39739227fffa7de71d1604c7120 (patch)
tree6d4d103a118b96944e7c8bb4282502250012400a /usr.bin/telnet
parent2bbfbcee9b01ef81ac62be96ca464417a1c9c63c (diff)
downloadFreeBSD-src-0abc0cfcd6efa39739227fffa7de71d1604c7120.zip
FreeBSD-src-0abc0cfcd6efa39739227fffa7de71d1604c7120.tar.gz
Fix buffer size of ALIGNed buffer.
PR: bin/20053 Submitted by: Alex Kapranoff <alex@kapran.bitmcnit.bryansk.su>
Diffstat (limited to 'usr.bin/telnet')
-rw-r--r--usr.bin/telnet/commands.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/telnet/commands.c b/usr.bin/telnet/commands.c
index 12904b8..1ab5e54 100644
--- a/usr.bin/telnet/commands.c
+++ b/usr.bin/telnet/commands.c
@@ -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;
}
OpenPOWER on IntegriCloud