This repository was archived by the owner on May 4, 2018. It is now read-only.
This repository was archived by the owner on May 4, 2018. It is now read-only.
Open
Description
Although understandably an edge case, heap_insert should fail to insert a new node if heap->nelts == UINT_MAX.
It is possible, though unlikely, that unsigned int is 16 bit. Even in a 32 bit world, hitting UINT_MAX becomes more likely as machines get faster.
At the very least it should assert(heap->nelts < UINT_MAX). It would be better to abort() than blindly corrupt the data structure.
Metadata
Metadata
Assignees
Labels
No labels