priitj / whitedb

WhiteDB memory database
http://whitedb.org/
GNU General Public License v3.0
608 stars 78 forks source link

Incorrect consistency check #47

Closed fsgeek closed 3 years ago

fsgeek commented 5 years ago

There is a consistency check in wg_free_object, where it checks if the previous entry is free and is the expected size. This check has two bugs: (1) it checks the size of prevobject when it should check prevobjecthead (so the consistency check isn't doing what it should be) but this bug is masked by the fact that the ! on the getfreeobjectsize call doesn't bind to the entire conditional check. PR forthcoming.