From: Gergo Borus <41896618+gergo-b@users.noreply.github.com> Date: Tue, 20 Nov 2018 20:57:03 +0000 (+0100) Subject: Validate the found snapshot number X-Git-Tag: v0.8.1~2^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4adea9ccd264921c3719eb2860f9a79fe73f5cd2;p=thirdparty%2Fsnapper.git Validate the found snapshot number --- diff --git a/snapper/Btrfs.cc b/snapper/Btrfs.cc index 153b8c69..cb9f7b35 100644 --- a/snapper/Btrfs.cc +++ b/snapper/Btrfs.cc @@ -1463,6 +1463,9 @@ namespace snapper unsigned int num = stoi(rx.cap(1)); + if (!checkSnapshot(num)) + return make_pair(false, 0); + if (get_id(openSnapshotDir(num).fd()) != id) return make_pair(false, 0);