News for hackers. Stuff that matters.
Re:Inferbo: Infer-based buffer overrun analyzer by unwind on Monday February 06, 2017 @05:48PM (#13585056)
This sounds cool!

The first example has a pretty nasty typo. This:

  int *arr = malloc(9);
does of course not allocate enough space to make it safe to index arr up to 8. It only allocates 9 bytes, which on a typical 32-bit int machine only gives you room for 2.25 ints.

It should of course be:

  int *arr = malloc(9 * sizeof *arr);
It's fixed in the second example, where they introduce the malloc_wrapper().
Re:Inferbo: Infer-based buffer overrun analyzer by _shb on Monday February 06, 2017 @06:51PM (#13585545)
Thanks for pointing this out! Fixed in an update to the post.