Switch to recallocarray() for a few operations. Both growth and shrinkage
authorderaadt <deraadt@openbsd.org>
Wed, 31 May 2017 09:15:42 +0000 (09:15 +0000)
committerderaadt <deraadt@openbsd.org>
Wed, 31 May 2017 09:15:42 +0000 (09:15 +0000)
commiteaf8e3f625bd9364efecd3cd275b7db8f0a89776
treebeb6abd52d065ba8523537bae9538f802954aeac
parenta64355c7334c59be0e3cc85bf489b8cacada688b
Switch to recallocarray() for a few operations.  Both growth and shrinkage
are handled safely, and there also is no need for preallocation dances.
Future changes in this area will be less error prone.
Review and one bug found by markus
15 files changed:
usr.bin/ssh/auth2-pubkey.c
usr.bin/ssh/authfile.c
usr.bin/ssh/bitmap.c
usr.bin/ssh/clientloop.c
usr.bin/ssh/hostfile.c
usr.bin/ssh/krl.c
usr.bin/ssh/misc.c
usr.bin/ssh/scp.c
usr.bin/ssh/session.c
usr.bin/ssh/ssh-pkcs11.c
usr.bin/ssh/sshbuf.c
usr.bin/ssh/sshkey.c
usr.bin/ssh/utf8.c
usr.bin/ssh/xmalloc.c
usr.bin/ssh/xmalloc.h