mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-12 14:21:18 +08:00
(callrpc): Use strncpy instead of strcpy for security reasons.
This commit is contained in:
parent
355fca3b07
commit
367179a7f9
@ -118,7 +118,8 @@ callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
|
||||
crp->valid = 1;
|
||||
crp->oldprognum = prognum;
|
||||
crp->oldversnum = versnum;
|
||||
(void) strcpy(crp->oldhost, host);
|
||||
(void) strncpy (crp->oldhost, host, 255);
|
||||
crp->oldhost[256] = '\0';
|
||||
}
|
||||
tottimeout.tv_sec = 25;
|
||||
tottimeout.tv_usec = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user