diff options
-rw-r--r-- | utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -2484,6 +2484,11 @@ const char *subvol_strip_mountpoint(const char *mnt, const char *full_path) if (!len) return full_path; + if ((strncmp(mnt, full_path, len) != 0) || (full_path[len] != '/')) { + error("not on mount point: %s", mnt); + exit(1); + } + if (mnt[len - 1] != '/') len += 1; |