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
ee0a1e1b
Commit
ee0a1e1b
authored
Nov 29, 2020
by
Andrius Štikonas
Browse files
Add a limit on the amount of data that can be passed back via DBus.
parent
c556f390
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/util/externalcommandhelper.cpp
View file @
ee0a1e1b
...
...
@@ -163,10 +163,15 @@ QVariantMap ExternalCommandHelper::CopyBlocks(const QString& sourceDevice, const
if
(
!
blockSize
)
{
return
QVariantMap
();
}
// Prevent some out of memory situations
constexpr
qint64
MiB
=
1
<<
30
;
if
(
blockSize
>
100
*
MiB
)
{
return
QVariantMap
();
}
if
(
targetDevice
.
isEmpty
()
&&
sourceLength
>
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