]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libc: provide some bounds-checking through reallocarray(3).
authorPedro F. Giffuni <pfg@FreeBSD.org>
Sun, 12 Mar 2017 16:03:34 +0000 (16:03 +0000)
committerPedro F. Giffuni <pfg@FreeBSD.org>
Sun, 12 Mar 2017 16:03:34 +0000 (16:03 +0000)
commit9f36610f9ef53017afbc50520b999882958c402c
tree48681fad678d71728cf4d1e2f4b92b96a5fad900
parentab23521a4954485a56e9016dfbde6e7edff6c516
libc: provide some bounds-checking through reallocarray(3).

reallocarray(3) is a non portable extension that originated in OpenBSD.
Given that it is already in FreeBSD's libc it is useful for the cases
where reallocation involves a multiplication.

MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D9955
12 files changed:
lib/libc/gen/glob.c
lib/libc/gen/scandir.c
lib/libc/gen/setmode.c
lib/libc/gen/wordexp.c
lib/libc/iconv/citrus_esdb.c
lib/libc/net/nsdispatch.c
lib/libc/regex/regcomp.c
lib/libc/rpc/getnetconfig.c
lib/libc/stdio/open_wmemstream.c
lib/libc/stdio/printf-pos.c
lib/libc/stdio/ungetc.c
lib/libc/stdlib/getenv.c