google / cmockery

A lightweight library to simplify and generalize the process of writing unit tests for C applications.
Apache License 2.0
1.05k stars 371 forks source link

update memory allocate check #30

Open aronlt opened 8 years ago

aronlt commented 8 years ago

If we pass an invalid pointer to _test_free() function, this function will be crashed. So I update this function, add some checking code. Therefore, cmockery can test cases that free invaild pointer, and free an allocated block twice.

cryptomilk commented 8 years ago

cmockery is dead since several years, you probably want to take a look at https://cmocka.org which is the successor of cmockery. We are happy to accept patches to improve it.