Commit 2d397bb2 authored by Oxalica --'s avatar Oxalica -- Committed by Andrius Štikonas
Browse files

Fix out of bounds read when parsing fstab.

Some fstab files only have 3 fields and mount options are completely omitted.
parent 00de1308
......@@ -91,7 +91,8 @@ FstabEntryList readFstabEntries( const QString& fstabPath )
auto fsSpec =;
auto mountPoint = unescapeSpaces(;
auto fsType =;
auto options =;
// Options may be omitted in some rare cases like NixOS generated fstab.
auto options = splitLine.length() >= 4 ? : QString::fromLatin1("defaults");
switch (splitLine.length()) {
case 4:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment