commit c94d9336f7688519926c170032e6f0da8c5d11c5 from: Marcel Rodrigues date: Sat Jun 04 13:20:02 2016 UTC Fix off-by-one error in readlink() call. commit - 9ed7a511444ed80a7226748c50e94828ec7bd57f commit + c94d9336f7688519926c170032e6f0da8c5d11c5 blob - c809e31de76273efd645a82c2d0f3675598f5fcc blob + afe7d34a8c8920aaa634ac932660a8ad523042d8 --- rover.c +++ rover.c @@ -810,7 +810,7 @@ static int cpyfile(const char *srcpath) { ret = lstat(srcpath, &st); if (ret < 0) return ret; if (S_ISLNK(st.st_mode)) { - ret = readlink(srcpath, BUF1, BUFLEN); + ret = readlink(srcpath, BUF1, BUFLEN-1); if (ret < 0) return ret; BUF1[ret] = '\0'; ret = symlink(BUF1, dstpath);