GrapheneOS / Camera

Modern camera app focused on privacy and security with QR & barcode scanning.
https://grapheneos.org/
MIT License
826 stars 87 forks source link

Binary tab in QR Scan Mode is broken #354

Closed delitako closed 1 year ago

delitako commented 1 year ago

https://github.com/GrapheneOS/Camera/blob/71462d8762f7f8c0217be4f09fe22bab6c7bf8a3/app/src/main/java/app/grapheneos/camera/ui/activities/MainActivity.kt#L1060-L1071

The output string uses at least 3 characters per byte of input, so the output length shouldn't be bytes.size. Furthermore, the loop shouldn't be skipping over input bytes with step 3 nor excluding the last byte.

I might submit a PR to fix this if I get the time.