summaryrefslogtreecommitdiffstats
path: root/sshbuf.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* upstream: change explicit_bzero();free() to freezero()jsg@openbsd.org2020-02-281-3/+2
| | | | | | | | | | While freezero() returns early if the pointer is NULL the tests for NULL in callers are left to avoid warnings about passing an uninitialised size argument across a function boundry. ok deraadt@ djm@ OpenBSD-Commit-ID: 2660fa334fcc7cd05ec74dd99cb036f9ade6384a
* upstream: Replace all calls to signal(2) with a wrapper arounddtucker@openbsd.org2020-01-231-2/+2
| | | | | | | | sigaction(2). This wrapper blocks all other signals during the handler preventing races between handlers, and sets SA_RESTART which should reduce the potential for short read/write operations. OpenBSD-Commit-ID: 5e047663fd77a40d7b07bdabe68529df51fd2519
* upstream: make grandparent-parent-child sshbuf chains robust todjm@openbsd.org2018-11-161-7/+10
| | | | | | | use-after-free faults if the ancestors are freed before the descendents. Nothing in OpenSSH uses this deallocation pattern. Reported by Jann Horn OpenBSD-Commit-ID: d93501d1d2734245aac802a252b9bb2eccdba0f2
* upstream: remove legacy buffer API emulation layer; ok djm@markus@openbsd.org2018-07-101-20/+2
| | | | OpenBSD-Commit-ID: 2dd5dc17cbc23195be4299fa93be2707a0e08ad9
* upstream commitdjm@openbsd.org2017-06-071-3/+3
| | | | | | | unconditionally zero init size of buffer; ok markus@ deraadt@ Upstream-ID: 218963e846d8f26763ba25afe79294547b99da29
* upstream commitderaadt@openbsd.org2017-06-011-8/+8
| | | | | | | | | 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 Upstream-ID: 822d664d6a5a1d10eccb23acdd53578a679d5065
* upstream commitmarkus@openbsd.org2017-05-271-1/+4
| | | | | | sshbuf_consume: reset empty buffer; ok djm@ Upstream-ID: 0d4583ba57f69e369d38bbd7843d85cac37fa821
* upstream commitdjm@openbsd.org2016-11-291-33/+43
| | | | | | | split allocation out of sshbuf_reserve() into a separate sshbuf_allocate() function; ok markus@ Upstream-ID: 11b8a2795afeeb1418d508a2c8095b3355577ec2
* upstream commitderaadt@openbsd.org2016-09-121-4/+4
| | | | | | | | Add MAXIMUM(), MINIMUM(), and ROUNDUP() to misc.h, then use those definitions rather than pulling <sys/param.h> and unknown namespace pollution. ok djm markus dtucker Upstream-ID: 712cafa816c9f012a61628b66b9fbd5687223fb8
* upstream commitdjm@openbsd.org2016-01-131-5/+5
| | | | | | | use explicit_bzero() more liberally in the buffer code; ok deraadt Upstream-ID: 0ece37069fd66bc6e4f55eb1321f93df372b65bf
* upstream commitmmcc@openbsd.org2015-12-181-5/+3
| | | | | | | | Remove NULL-checks before sshbuf_free(). ok djm@ Upstream-ID: 5ebed00ed5f9f03b119a345085e8774565466917
* upstream commitdjm@openbsd.org2015-10-061-2/+2
| | | | | | some more bzero->explicit_bzero, from Michael McConville Upstream-ID: 17f19545685c33327db2efdc357c1c9225ff00d0
* upstream commitderaadt@openbsd.org2015-01-261-2/+2
| | | | | Reduce use of <sys/param.h> and transition to <limits.h> throughout. ok djm markus
* - (djm) [defines.h sshbuf.c] Move __predict_true|false to defines.h andDamien Miller2014-09-021-10/+0
| | | | conditionalise to avoid duplicate definition.
* - deraadt@cvs.openbsd.org 2014/06/25 14:16:09Damien Miller2014-07-021-1/+2
| | | | | | [sshbuf.c] unblock SIGSEGV before raising it ok djm
* - (djm) [sshbuf.c] need __predict_falseDamien Miller2014-05-151-0/+10
|
* - (djm) [Makefile.in configure.ac sshbuf-getput-basic.c]Damien Miller2014-05-151-1/+1
| | | | [sshbuf-getput-crypto.c sshbuf.c] compilation and portability fixes
* - djm@cvs.openbsd.org 2014/04/30 05:29:56Damien Miller2014-05-151-0/+405
[bufaux.c bufbn.c bufec.c buffer.c buffer.h sshbuf-getput-basic.c] [sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c sshbuf.h ssherr.c] [ssherr.h] New buffer API; the first installment of the conversion/replacement of OpenSSH's internals to make them usable as a standalone library. This includes a set of wrappers to make it compatible with the existing buffer API so replacement can occur incrementally. With and ok markus@ Thanks also to Ben Hawkes, David Tomaschik, Ivan Fratric, Matthew Dempsky and Ron Bowes for a detailed review.