reallocarray() in OpenBSD: Integer Overflow Detection for Free

The upcoming OpenBSD 5.6 release introduces anew libc function called reallocarray(3)that extendsrealloc(3)with built-in integer overflow detection.In this post, I’ll discuss why it’s useful and how it can be used tofix unsafe code.