-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] java.lang.StringIndexOutOfBoundsException: String index out of range: 24 #2829
Comments
Can you supply the APK? |
Just checking with the team to provide APK, I will upload it in a day or two. |
Thanks for supplying the APK. I could re-produce the issue with apktool version 2.6 and 2.6.1. I could also successfully decode the APK using version 2.5.1:
But building again the APK fails:
|
Thanks for checking. May be resolved after #2816 - haven't checked. |
Unfortunately not:
|
Confirmed. The rewritten string/style decoder bites again. |
This string has style information of a So there is a hacky workaround by just checking if the span end is within the length of the string and proceeding with a same subset value. However, this is easy to see in this specific circumstance, but may lead to bugged strings in greater picture. I wrote a little debug helper to dump out these strings that violated this.
It does look right when decoded now
So I grabbed the original and rebuilt string. So what we built and the original match 1-1. So I believe we can find a tweak the encoder to take the remaining string after the offset if our ending offset exceeds the length of the string. So I've got a draft up and working to see if I can make some tests for this - #3254 |
Information
apktool -version
) - 2.6Stacktrace/Logcat
Questions to ask before submission
apktool d
without changing anything? YesThe text was updated successfully, but these errors were encountered: