two defensive changes from Tobias Stoeckmann via GHPR287
authordjm <djm@openbsd.org>
Fri, 8 Apr 2022 04:40:40 +0000 (04:40 +0000)
committerdjm <djm@openbsd.org>
Fri, 8 Apr 2022 04:40:40 +0000 (04:40 +0000)
commitfe1380ca86fc055220500fbc416b0d525de05e69
treee7d626fbab2699b44d5e5d52d59df7c97df7996a
parented909ed144d678d81758537450ef7d2f8cbb1614
two defensive changes from Tobias Stoeckmann via GHPR287

enforce stricter invarient for sshbuf_set_parent() - never allow
a buffer to have a previously-set parent changed.

In sshbuf_reset(), if the reallocation fails, then zero the entire
buffer and not the (potentially smaller) default initial alloc size.
usr.bin/ssh/sshbuf.c