-
Notifications
You must be signed in to change notification settings - Fork 372
Labels
brilligUnconstrained functions / brillig IRUnconstrained functions / brillig IR
Milestone
Description
Description
The resize_to_fit method may expand the memory if needed. The desired addressable space is the u32 range. Given this, it could be possible that new_size is any value in the u32 range. According to the documentation for resize(), the maximum new length is isize::MAX which for 32-bit machines it would be half of the u32 range.
Impact
This will make it so that large portions of memory are unusable on certain architectures.
Recommendation
Replace this logic with resizing logic that will work for all addresses in the expected memory address range.
AuditHub Issue Link
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
brilligUnconstrained functions / brillig IRUnconstrained functions / brillig IR