From 2cd6da6ffcf1b3d60d0b54e13d5c26a43e4a49a4 Mon Sep 17 00:00:00 2001 From: Sylvia van Os Date: Wed, 25 Jan 2023 18:13:58 +0100 Subject: [PATCH] Fix crash on invalid import URI --- app/src/main/java/protect/card_locker/ImportURIHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/protect/card_locker/ImportURIHelper.java b/app/src/main/java/protect/card_locker/ImportURIHelper.java index 1549ed9cd..11477b991 100644 --- a/app/src/main/java/protect/card_locker/ImportURIHelper.java +++ b/app/src/main/java/protect/card_locker/ImportURIHelper.java @@ -117,7 +117,7 @@ public class ImportURIHelper { } return new LoyaltyCard(-1, store, note, expiry, balance, balanceType, cardId, barcodeId, barcodeType, headerColor, 0, Utils.getUnixTime(), 100,0); - } catch (NullPointerException | NumberFormatException | UnsupportedEncodingException ex) { + } catch (NullPointerException | NumberFormatException | UnsupportedEncodingException | ArrayIndexOutOfBoundsException ex) { throw new InvalidObjectException("Not a valid import URI"); } }