Fix backup NPE

Fixes #7526
pull/1/head
Moxie Marlinspike 7 years ago
parent 90006e81db
commit 73233c01ba

@ -265,9 +265,12 @@ public class FullBackupExporter extends FullBackupBase {
while ((read = in.read(buffer)) != -1) {
byte[] ciphertext = cipher.update(buffer, 0, read);
if (ciphertext != null) {
outputStream.write(ciphertext);
mac.update(ciphertext);
}
}
byte[] remainder = cipher.doFinal();
outputStream.write(remainder);

Loading…
Cancel
Save