diff options
author | John Reck <jreck@google.com> | 2011-03-04 12:47:09 -0800 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-03-04 12:47:09 -0800 |
commit | a0df4b2f2c4484a06ecb0f496cebe62081e2902d (patch) | |
tree | 52a3f3bb3b97bdd8bf80c41a76338f61c9309fb2 /src/com/android/browser/provider | |
parent | 00a227596d5a1d5b68943fda80f3680b72601005 (diff) | |
download | packages_apps_Browser-a0df4b2f2c4484a06ecb0f496cebe62081e2902d.zip packages_apps_Browser-a0df4b2f2c4484a06ecb0f496cebe62081e2902d.tar.gz packages_apps_Browser-a0df4b2f2c4484a06ecb0f496cebe62081e2902d.tar.bz2 |
Add invalid id check to isValidParent
Bug: 3512786
Change-Id: I8f16038e230a24bcc50e4cc75d24f413d0166844
Diffstat (limited to 'src/com/android/browser/provider')
-rw-r--r-- | src/com/android/browser/provider/BrowserProvider2.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/browser/provider/BrowserProvider2.java b/src/com/android/browser/provider/BrowserProvider2.java index c6b1bc7..305c794 100644 --- a/src/com/android/browser/provider/BrowserProvider2.java +++ b/src/com/android/browser/provider/BrowserProvider2.java @@ -1236,6 +1236,9 @@ public class BrowserProvider2 extends SQLiteContentProvider { private boolean isValidParent(String accountType, String accountName, long parentId) { + if (parentId <= 0) { + return false; + } Uri uri = ContentUris.withAppendedId(Bookmarks.CONTENT_URI, parentId); Cursor c = query(uri, new String[] { Bookmarks.ACCOUNT_NAME, Bookmarks.ACCOUNT_TYPE }, |