Developer patches two longstanding crash bugs in dio and Flutter's file_selector_android
A developer contributing to DEV's Summer Bug Smash identified and fixed two pre-existing crash bugs in widely used Flutter and Dart packages. In dio, the popular HTTP client library, an empty server response body with a JSON content type caused a FormatException crash in FusedTransformer's slow path, even though sibling transformers already handled this case correctly. A prior pull request had fixed the fast path but left the slow path — used when a custom responseDecoder is set — unguarded. In flutter/packages, the file_selector_android plugin crashed the app when a file could not be copied due to a SecurityException or IOException, despite the method containing catch blocks that intentionally set the path to null. Both fixes extended existing, deliberate logic in each codebase to the specific code branches that had been overlooked.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in