diff options
| author | 2024-06-03 12:56:47 -0700 | |
|---|---|---|
| committer | 2024-06-03 15:02:41 -0700 | |
| commit | b85bee508793e31d6fe37fc9cd4e8fa3787113cc (patch) | |
| tree | 105b540a697721f2620b91e549496b1fce1334de | |
| parent | 04665456754dd7c14b63dd88d5bf4392f0fe3856 (diff) | |
Fail parseUri if end is missing
Bug: 318683126
Test: atest IntentTest
Flag: EXEMPT bugfix
Change-Id: I5f619ced684ff505ce2b7408cd35dd3e9be89dea
| -rw-r--r-- | core/java/android/content/Intent.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index c8cae822570e..02d62a2a402b 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -8157,6 +8157,9 @@ public class Intent implements Parcelable, Cloneable { int eq = uri.indexOf('=', i); if (eq < 0) eq = i-1; int semi = uri.indexOf(';', i); + if (semi < 0) { + throw new URISyntaxException(uri, "uri end not found"); + } String value = eq < semi ? Uri.decode(uri.substring(eq + 1, semi)) : ""; // action |