Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
System
KPMCore
Commits
c556f390
Commit
c556f390
authored
Nov 29, 2020
by
Andrius Štikonas
Browse files
Add a limit on blocksize to prevent out-of-memory situation.
parent
9dd38744
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/util/externalcommandhelper.cpp
View file @
c556f390
...
...
@@ -163,6 +163,11 @@ QVariantMap ExternalCommandHelper::CopyBlocks(const QString& sourceDevice, const
if
(
!
blockSize
)
{
return
QVariantMap
();
}
constexpr
qint64
MiB
=
1
<<
30
;
if
(
blockSize
>
100
*
MiB
)
{
return
QVariantMap
();
}
QVariantMap
reply
;
reply
[
QStringLiteral
(
"success"
)]
=
true
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment