Skip to content
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

Crash with invalid base64 data #18

Open
maximilize opened this issue Jan 20, 2023 · 1 comment
Open

Crash with invalid base64 data #18

maximilize opened this issue Jan 20, 2023 · 1 comment

Comments

@maximilize
Copy link

This crash always happens if the base64 data is not 100% valid. This happens on Android, I didn't test iOS.

toByteArray("YXNkZgo=") // works
toByteArray("YXNkZgo") // crash
toByteArray("YXNkZgo==") // crash

If it's even more corrupted, with for example invalid chars like ,&* or so, it crashes as well.

01-20 15:32:48.194  3406  3406 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-20 15:32:48.194  3406  3406 F DEBUG   : Build fingerprint: 'Android/sdk_phone_x86/generic_x86:11/RSR1.210210.001.A1/7193139:userdebug/dev-keys'
01-20 15:32:48.194  3406  3406 F DEBUG   : Revision: '0'
01-20 15:32:48.194  3406  3406 F DEBUG   : ABI: 'x86'
01-20 15:32:48.194  3406  3406 F DEBUG   : Timestamp: 2023-01-20 15:32:48+0100
01-20 15:32:48.194  3406  3406 F DEBUG   : pid: 3238, tid: 3298, name: mqt_js  >>> com.jblapp <<<
01-20 15:32:48.194  3406  3406 F DEBUG   : uid: 10136
01-20 15:32:48.194  3406  3406 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
01-20 15:32:48.194  3406  3406 F DEBUG   :     eax 00000000  ebx 00000ca6  ecx 00000ce2  edx 00000006
01-20 15:32:48.194  3406  3406 F DEBUG   :     edi e739c81e  esi b426a940
01-20 15:32:48.194  3406  3406 F DEBUG   :     ebp e99beb90  esp b426a8e8  eip e99beb99
01-20 15:32:48.253  3406  3406 F DEBUG   : backtrace:
01-20 15:32:48.253  3406  3406 F DEBUG   :       #00 pc 00000b99  [vdso] (__kernel_vsyscall+9)
01-20 15:32:48.253  3406  3406 F DEBUG   :       #01 pc 0005ad68  /apex/com.android.runtime/lib/bionic/libc.so (syscall+40) (BuildId: 6e3a0180fa6637b68c0d181c343e6806)
01-20 15:32:48.253  3406  3406 F DEBUG   :       #02 pc 00076511  /apex/com.android.runtime/lib/bionic/libc.so (abort+209) (BuildId: 6e3a0180fa6637b68c0d181c343e6806)
01-20 15:32:48.253  3406  3406 F DEBUG   :       #03 pc 000b783c  /data/app/~~fW1sq5DMEO4DOlGQyVjpDw==/com.jblapp-J8UQIcQPuouGruyooLoyiA==/lib/x86/libc++_shared.so (BuildId: 5d632b8bdfc3c6b26faedb2f035955edb77efe9b)
...
@craftzdog
Copy link
Owner

yeah it should be validated before converting

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