From 88322f341a645f94eb1c793bb5a1316c46883e32 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 14 Feb 2017 15:15:20 +0000 Subject: [PATCH] Handle impossible issue in hmac calculation. --- .../java/at/bitfire/davdroid/journalmanager/BaseManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/at/bitfire/davdroid/journalmanager/BaseManager.java b/app/src/main/java/at/bitfire/davdroid/journalmanager/BaseManager.java index ac859a87..2e574fab 100644 --- a/app/src/main/java/at/bitfire/davdroid/journalmanager/BaseManager.java +++ b/app/src/main/java/at/bitfire/davdroid/journalmanager/BaseManager.java @@ -78,8 +78,8 @@ abstract class BaseManager { hashContent.write(content); } catch (IOException e) { - // FIXME: Do something - e.printStackTrace(); + // Can never happen, but just in case, return a bad hmac + return "DEADBEEFDEADBEEFDEADBEEFDEADBEEF".getBytes(); } return hmac(keyBase64, hashContent.toByteArray());