fix(3p/nix): remove usage of strcpy
Change-Id: I86125609f433469a8722c780fd758234211d677e Reviewed-on: https://cl.tvl.fyi/c/depot/+/1381 Tested-by: BuildkiteCI Reviewed-by: Alyssa Ross <hi@alyssa.is> Reviewed-by: glittershark <grfn@gws.fyi>
This commit is contained in:
parent
ec46a594df
commit
9a85694b86
4 changed files with 10 additions and 9 deletions
2
third_party/nix/src/libstore/build.cc
vendored
2
third_party/nix/src/libstore/build.cc
vendored
|
|
@ -2833,7 +2833,7 @@ void DerivationGoal::runChild() {
|
|||
}
|
||||
|
||||
struct ifreq ifr;
|
||||
strcpy(ifr.ifr_name, "lo");
|
||||
strncpy(ifr.ifr_name, "lo", sizeof("lo"));
|
||||
ifr.ifr_flags = IFF_UP | IFF_LOOPBACK | IFF_RUNNING;
|
||||
if (ioctl(fd.get(), SIOCSIFFLAGS, &ifr) == -1) {
|
||||
throw SysError("cannot set loopback interface flags");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue