diff --git a/src/util/externalcommandhelper.cpp b/src/util/externalcommandhelper.cpp index 9c68226..fc11591 100644 --- a/src/util/externalcommandhelper.cpp +++ b/src/util/externalcommandhelper.cpp @@ -158,6 +158,11 @@ QVariantMap ExternalCommandHelper::CopyBlocks(const QString& sourceDevice, const if (!isCallerAuthorized()) { return QVariantMap(); } + + // Avoid division by zero further down + if (!blockSize) { + return QVariantMap(); + } QVariantMap reply; reply[QStringLiteral("success")] = true;