discoproject / discodb

An efficient, immutable, persistent mapping object
http://discodb.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
99 stars 31 forks source link

Fixed uint32_t calculation overflow bug in ddb_list #10

Open ontholerian opened 9 years ago

ontholerian commented 9 years ago

The calculation of the size of the next increment of list->list is being calculated using uint32_t sized integers, yet it is possible that the calculation can exceed the maximum value of uint32_t. Encountering this case causes the array of list->list to shrink suddenly to the calculated size minus the max uint32_t value, yet list->size still increases to imply that there is more space available then there is. Later, when the next element is attempted to be added, the value of list->i goes beyond the allocated space of list->list and causes the program to segfault.

pombredanne commented 8 years ago

@tuulos @pmundkur Are you still maintaining discoDB?

pmundkur commented 8 years ago

@pombredanne I don't maintain discodb or disco. @pooya, do you know what the current maintainership status is?