Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unsafe cast and detect resize overflow. (#31106)
Summary: Removing unsafe cast from `int` to `uint16_t`. Also, adding code to detect multiplication overflow during buffer resize. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [General] [Fix] - Fix unsafe cast and detect overflow in MapBuffer. Pull Request resolved: #31106 Test Plan: Code compiles in Visual Studio 2019 without the unsafe cast warning (or error depending on the configuration). Reviewed By: mdvacca Differential Revision: D26865138 Pulled By: rozele fbshipit-source-id: 4692a38b05fc873e31fbbe94d70803244e82de5d
- Loading branch information