google / cmockery

A lightweight library to simplify and generalize the process of writing unit tests for C applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

malloc size overflow

jessa0 opened this issue · comments

commented

_test_malloc ironically suffers from a painfully obvious size_t overflow when calculating allocate_size. a simple assert_true(allocate_size > size) should fix this.