]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
rpcgen: make compiler arglist allocation dynamic
authorbrooks <brooks@FreeBSD.org>
Tue, 15 Oct 2019 16:05:17 +0000 (16:05 +0000)
committerbrooks <brooks@FreeBSD.org>
Tue, 15 Oct 2019 16:05:17 +0000 (16:05 +0000)
commit5f5e69540ece7b498e6c3eec2e8a8df176362b27
treee14afa277c4669c24fb6c14a421b7fc44806d7f2
parent36182cc5e9e79892ac4035d97bd5d8b336e45c0f
rpcgen: make compiler arglist allocation dynamic

Limit argmax to an absurdly large value prevent overflow (no overflow
possible on FreeBSD due to ARG_MAX).

In CheriBSD we exceed the 19 non-NULL arguments in the static array.  Add
a simple size doubling allocator and increase the default to 32.

GC remnants of support for fixed arguments.

Reviewed by: archardson (prior version), James Clarke (prior version)
MFC after: 1 week
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D21971
usr.bin/rpcgen/rpc_main.c