diff options
author | Kane York <kanepyork@gmail.com> | 2020-07-23T20·02-0700 |
---|---|---|
committer | kanepyork <rikingcoding@gmail.com> | 2020-07-23T22·00+0000 |
commit | 9a85694b8616f2e10f19440f4db9017d44dfae18 (patch) | |
tree | b915674b395abd2bfe617e0a4e50c5944dc540a1 /third_party/nix/src/libstore/build.cc | |
parent | ec46a594dff3453c1091b01d4904f1ab1947d60d (diff) |
fix(3p/nix): remove usage of strcpy r/1437
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>
Diffstat (limited to 'third_party/nix/src/libstore/build.cc')
-rw-r--r-- | third_party/nix/src/libstore/build.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/third_party/nix/src/libstore/build.cc b/third_party/nix/src/libstore/build.cc index dcc3c7edc7af..da35388d855a 100644 --- a/third_party/nix/src/libstore/build.cc +++ b/third_party/nix/src/libstore/build.cc @@ -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"); |