]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blobdiff - util/symlinks.c
Merge branch 'maint' into next
[thirdparty/e2fsprogs.git] / util / symlinks.c
index 10b3a37443f529f3c8ac4a1f7a2ec91277d89d83..600effac4d9845ae0928c2aa0e802f32cf6cf142 100644 (file)
@@ -170,7 +170,7 @@ static void fix_symlink (char *path, dev_t my_dev)
        struct stat stbuf, lstbuf;
        int c, fix_abs = 0, fix_messy = 0, fix_long = 0;
 
-       if ((c = readlink(path, lpath, sizeof(lpath))) == -1) {
+       if ((c = readlink(path, lpath, sizeof(lpath) - 1)) == -1) {
                perror(path);
                return;
        }