Package: btrfs-progs Followup-For: Bug #920886 Here's a properly formatted patch that fixes the bug; it appears to work on my system at least.
-- System Information: Debian Release: buster/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (102, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.20.2 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages btrfs-progs depends on: ii libblkid1 2.33.1-0.1 ii libc6 2.28-5 ii liblzo2-2 2.10-0.1 ii libuuid1 2.33.1-0.1 ii libzstd1 1.3.8+dfsg-3 ii zlib1g 1:1.2.11.dfsg-1 btrfs-progs recommends no packages. Versions of packages btrfs-progs suggests: ii duperemove 0.11.1-3 -- no debconf information
--- a/utils.c +++ b/utils.c @@ -2079,7 +2079,7 @@ int find_mount_root(const char *path, ch while ((ent = getmntent(mnttab))) { len = strlen(ent->mnt_dir); if (strncmp(ent->mnt_dir, path, len) == 0 && - (path[len] == '/' || path[len] == '\0')) { + (len == 1 || path[len] == '/' || path[len] == '\0')) { /* match found and use the latest match */ if (longest_matchlen <= len) { free(longest_match);