mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 06:55:59 +03:00
Potentially fix crash acessing a deleted pointer.
This commit is contained in:
parent
ec28465e01
commit
5fe9717598
1 changed files with 4 additions and 7 deletions
|
@ -156,16 +156,13 @@ void PropagateUploadEncrypted::slotFolderEncryptedMetadataReceived(const QJsonDo
|
|||
|
||||
qCDebug(lcPropagateUploadEncrypted) << "Creating the encrypted file.";
|
||||
|
||||
auto *input = new QFile(info.absoluteFilePath());
|
||||
auto *output = new QFile(QDir::tempPath() + QDir::separator() + encryptedFile.encryptedFilename);
|
||||
QFile input(info.absoluteFilePath());
|
||||
QFile output(QDir::tempPath() + QDir::separator() + encryptedFile.encryptedFilename);
|
||||
|
||||
QByteArray tag;
|
||||
EncryptionHelper::fileEncryption(encryptedFile.encryptionKey, encryptedFile.initializationVector, input, output, tag);
|
||||
EncryptionHelper::fileEncryption(encryptedFile.encryptionKey, encryptedFile.initializationVector, &input, &output, tag);
|
||||
|
||||
input->deleteLater();
|
||||
output->deleteLater();
|
||||
|
||||
_completeFileName = output->fileName();
|
||||
_completeFileName = output.fileName();
|
||||
|
||||
qCDebug(lcPropagateUploadEncrypted) << "Creating the metadata for the encrypted file.";
|
||||
|
||||
|
|
Loading…
Reference in a new issue