News for hackers. Stuff that matters.
Re:FreeBSD Core Team Statement on FreeBSD Development Processes by loeg on Monday March 29, 2021 @05:23PM (#26628342)
I understand what mallocarray does and why it is preferable. In these cases, the multiplied values happen to be constrained such that overflow is not possible. Given that precondition, the two patterns are functionally equivalent.

For what it's worth, I tend to advocate for using mallocarray and would use mallocarray in the same places Donenfeld does here. But unless overflow can actually happen, it's stylistic rather than "bug."

There are no comments on this comment yet.