diff --git a/src/org/thialfihar/android/apg/ApgService.java b/src/org/thialfihar/android/apg/ApgService.java index 0cfb065db..e395a808d 100644 --- a/src/org/thialfihar/android/apg/ApgService.java +++ b/src/org/thialfihar/android/apg/ApgService.java @@ -147,6 +147,9 @@ public class ApgService extends Service { * @return master key if found, or 0 */ private static long get_master_key(String search_key) { + if (search_key == null || search_key.length() != 8) { + return 0; + } ArrayList tmp = new ArrayList(); tmp.add(search_key); long[] _keys = get_master_key(tmp);