Don't read unlimited data from files

It now guards against reading infinite files such as `/dev/zero`.
And most readings are bound with a (lax) limit.
As a side effect, more checking are done when reading a file and
overall the reading procedure is more robust.

PR #19095.
This commit is contained in:
Chocobo1 2023-06-14 13:38:19 +08:00 committed by GitHub
parent 81bc910d68
commit 79ca2e145f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 370 additions and 199 deletions

View file

@ -30,7 +30,6 @@
#include <QAction>
#include <QDir>
#include <QFile>
#include <QHeaderView>
#include <QMenu>
#include <QMessageBox>