Skip to content

Conversation

@MegaManSec
Copy link

Wrap the entire decodeToBitmap() body in a try/catch that handles Throwable. This ensures both Exception and OutOfMemoryError are caught, preventing the app from crashing on oversized or invalid image inputs. Instead, an empty IntArray is returned to JNI callers.

Wrap the entire decodeToBitmap() body in a try/catch that handles Throwable.
This ensures both Exception and OutOfMemoryError are caught, preventing the
app from crashing on oversized or invalid image inputs. Instead, an empty
IntArray is returned to JNI callers.
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

Successfully merging this pull request may close these issues.

1 participant