Prevent signed integer overflow
authortobias <tobias@openbsd.org>
Mon, 8 May 2023 17:15:43 +0000 (17:15 +0000)
committertobias <tobias@openbsd.org>
Mon, 8 May 2023 17:15:43 +0000 (17:15 +0000)
commitddc5974845058f5711a661fb582276f2489ba1bc
treeb405909857971c7fda970ab0635c5af26fba4ff9
parent409c602088c99931ecc261d3d6df4062852f2787
Prevent signed integer overflow

A signed integer overflow could occur after INT_MAX bad password
attempts. Check for unlimited tries first and then increment the
counter. Also consider INT_MAX to be a valid upper limit.

ok millert@
usr.bin/passwd/local_passwd.c