commit 6304ffc8374258370e77e0aa4890b09e534b5dd7 Author: n8fr8 nathan@guardianproject.info Date: Wed Sep 4 08:24:14 2019 -0400
don't read the line twice and cause a NPE --- .../main/java/org/torproject/android/service/vpn/OrbotVpnManager.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/orbotservice/src/main/java/org/torproject/android/service/vpn/OrbotVpnManager.java b/orbotservice/src/main/java/org/torproject/android/service/vpn/OrbotVpnManager.java index 0af6dcff..9b099a24 100644 --- a/orbotservice/src/main/java/org/torproject/android/service/vpn/OrbotVpnManager.java +++ b/orbotservice/src/main/java/org/torproject/android/service/vpn/OrbotVpnManager.java @@ -448,8 +448,7 @@ public class OrbotVpnManager implements Handler.Callback { BufferedReader reader = new BufferedReader(new FileReader(filePid)); String line = reader.readLine(); if (line != null) { - pid = reader.readLine().trim(); - + pid = line.trim(); VpnUtils.killProcess(pid, "-9"); filePid.delete(); return true;
tor-commits@lists.torproject.org