Promote nrules/maxrules to size_t and make sure they can't overflow.
authormillert <millert@openbsd.org>
Wed, 27 Jan 2021 17:02:50 +0000 (17:02 +0000)
committermillert <millert@openbsd.org>
Wed, 27 Jan 2021 17:02:50 +0000 (17:02 +0000)
commit618b6875c7a364632bb25575ca3a4e3df28c1bd8
tree00df8acd248f6edc43e2cc423fdf1ad7ab5c1784
parentd33c290d9c7ed9dab6a59d12a3ea611304a7352f
Promote nrules/maxrules to size_t and make sure they can't overflow.
reallocarray(3) will fail if nmemb * size would overflow.
OK tb@ martijn@
usr.bin/doas/doas.c
usr.bin/doas/doas.h
usr.bin/doas/parse.y