diff options
author | Markus Doits <markus.doits@gmail.com> | 2011-01-17 22:21:41 +0000 |
---|---|---|
committer | Markus Doits <markus.doits@gmail.com> | 2011-01-17 22:21:41 +0000 |
commit | eb75eea64fbb0c9bfb86ed1fc1ef5dc1248144e0 (patch) | |
tree | 8b7353f1ba8161bab2fb5a698b676dc640fedbf5 /src | |
parent | dc02a74d52f66ebf7e4b3592ad7af09ce883f734 (diff) | |
download | open-keychain-eb75eea64fbb0c9bfb86ed1fc1ef5dc1248144e0.tar.gz open-keychain-eb75eea64fbb0c9bfb86ed1fc1ef5dc1248144e0.tar.bz2 open-keychain-eb75eea64fbb0c9bfb86ed1fc1ef5dc1248144e0.zip |
Allow get_master_key to accept null string
Return earlier on wrong length, too.
Diffstat (limited to 'src')
-rw-r--r-- | src/org/thialfihar/android/apg/ApgService.java | 3 |
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); |