Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Feb 2016 12:16:56 -0800
From:      Conrad Meyer <cem@FreeBSD.org>
To:        C Turt <cturt@hardenedbsd.org>
Cc:        arch@freebsd.org
Subject:   Re: OpenBSD mallocarray
Message-ID:  <CAG6CVpWbaFOQ1GzE1qmZFodXg_xZafmCc0b1kUh=0%2BFAjLPRvA@mail.gmail.com>
In-Reply-To: <CAB815ZafpqJoqr1oH8mDJM=0RxLptQJpoJLexw6P6zOi7oSXTQ@mail.gmail.com>
References:  <CAB815ZafpqJoqr1oH8mDJM=0RxLptQJpoJLexw6P6zOi7oSXTQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 1, 2016 at 11:57 AM, C Turt <cturt@hardenedbsd.org> wrote:
> I've recently started browsing the OpenBSD kernel source code, and have
> found the mallocarray function positively wonderful. I would like to
> discuss the possibility of getting this into FreeBSD kernel.
>
> ...
>
> The mallocarray is a wrapper for malloc which can be used in this
> situations to detect an integer overflow before allocating:

Sure.  +1 from me.  I don't think we want the M_CANFAIL hack, though.

Best,
Conrad



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpWbaFOQ1GzE1qmZFodXg_xZafmCc0b1kUh=0%2BFAjLPRvA>