Skip to content

rawQuery with nonsense SQL statement throws StringIndexOutOfBoundsException #295

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

Closed
brody4hire opened this issue Feb 3, 2017 · 4 comments

Comments

@brody4hire
Copy link

As reproduced in sqlcipher/sqlcipher-android-tests#16: calling SQLiteDatabase.rawQuery with a nonsense statement such as "101" or "false" would cause a StringIndexOutOfBoundsException to be thrown. According to the API I would expect some form of a SQLiteException to be thrown.

This has been fixed in AOSP quite a few years ago. I am not sure how easy it is to incorporate the fix due to the divergence in code.

@developernotes
Copy link
Member

Hi @brodybits

The StringIndexOutOfBoundsException should no longer occur with the 3.5.5 release, can you confirm?

@brody4hire
Copy link
Author

brody4hire commented Feb 9, 2017 via email

@brody4hire
Copy link
Author

When I try the nonsense SQL test with "101" and "false" I get the correct SQLiteException in case of SQLCipher (for Android) 3.5.5.

@developernotes
Copy link
Member

Thanks for confirming @brodybits!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants