aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/thialfihar/android/apg/ApgService.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/thialfihar/android/apg/ApgService.java')
-rw-r--r--src/org/thialfihar/android/apg/ApgService.java3
1 files changed, 3 insertions, 0 deletions
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<String> tmp = new ArrayList<String>();
tmp.add(search_key);
long[] _keys = get_master_key(tmp);