diff options
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"); |