Allow get_master_key to accept null string

Return earlier on wrong length, too.
This commit is contained in:
Markus Doits 2011-01-17 22:21:41 +00:00
parent dc02a74d52
commit eb75eea64f

View File

@ -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);