Page MenuHomePhabricator

Capacity overload
Closed, ResolvedPublic


On line 216 of base_flex_array.hpp

when doubling capacity we don't check if there is a roll over in the numbers. essentially we are not checking to see if the number we are attempting to put into capacity is too large to be handled. I understand this case is rare but it still needs to be handled.


Task Type
Proposed Urgency
3: Major
Triage Gravity
Triage Friction
Triage Relativity

Event Timeline

I added a temporary fix that uses a programmer defined max for UINT32. This should prevent a roll over of capacity and even set the array to no longer be resizable.

code added to lines.

Actually, the temporary fix sounds almost exactly like the best permanent fix. However, that max is already pre-defined: UINT32_MAX.

Ok When I was looking around I wasn't entirely sure that it was. So I decided to be safe. I will change the code.

So, can this be marked as resolved, then?

jcmcdonald claimed this task.

@nsgroggett, I think you said you fixed this. I marked it closed. Please re-open if it is NOT resolved.