[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] fixed crash when an user tries to add the same hidden service port twice



commit 2922e487305dc8a808990f2ae14169fc5485be24
Author: Igor Koznin <dixidroid@xxxxxxxxx>
Date:   Sun Jul 16 15:55:49 2017 +0300

    fixed crash when an user tries to add the same hidden service port twice
---
 app/src/main/java/org/torproject/android/OrbotMainActivity.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/src/main/java/org/torproject/android/OrbotMainActivity.java b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
index 0e9e2f72..3d4c954c 100644
--- a/app/src/main/java/org/torproject/android/OrbotMainActivity.java
+++ b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
@@ -624,7 +624,7 @@ public class OrbotMainActivity extends AppCompatActivity
 
         if (row == null || row.getCount() < 1) {
             cr.insert(HSContentProvider.CONTENT_URI, fields);
-        } else {
+        } else if (row.moveToFirst()) {
             onionHostname = row.getString(row.getColumnIndex(HSContentProvider.HiddenService.DOMAIN));
             row.close();
         }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits