From 31706cffdc1df60b96010fbbdbbdc6ec192fd913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Thu, 7 Jan 2021 01:25:12 +0000 Subject: [PATCH] Fix out of bounds read when parsing fstab. BUG: 429191 --- src/core/fstab.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/fstab.cpp b/src/core/fstab.cpp index dd6b79c..474f8b0 100644 --- a/src/core/fstab.cpp +++ b/src/core/fstab.cpp @@ -82,6 +82,12 @@ FstabEntryList readFstabEntries( const QString& fstabPath ) // (4) dump frequency (optional, defaults to 0), no comment is allowed if omitted, // (5) pass number (optional, defaults to 0), no comment is allowed if omitted, // (#) comment (optional). + + // Handle deprecated subtypes, e.g. sshfs#example. They are not relevant for partitioning, ignore them. + if (splitLine.size() < 3) { + continue; + } + auto fsSpec = splitLine.at(0); auto mountPoint = unescapeSpaces(splitLine.at(1)); auto fsType = splitLine.at(2);