summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/buffer/buffer.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* use freezero() instead of memset/explicit_bzero + free. Substantiallyderaadt2017-05-021-5/+2
| | | | | | | | | | reduces conditional logic (-218, +82). MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH cache alignment calculation bn/bn_exp.c wasn'tt quite right. Two other tricky bits with ASN1_STRING_FLAG_NDEF and BN_FLG_STATIC_DATA where the condition cannot be collapsed completely. Passes regress. ok beck
* Simplify/clean up BUF_MEM_grow_clean().jsing2017-04-091-17/+16
| | | | ok beck@
* With recallocarray() BUF_MEM_grow() is essentially the same asjsing2017-04-091-28/+2
| | | | | | | BUF_MEM_grow_clean() (the only difference is clearing on internal down sizing), so make it a wrapper. ok beck@ deraadt@
* Convert BUF_MEM_grow() and BUF_MEM_grow_clean() to recallocarray(),jsing2017-03-161-13/+3
| | | | | | | | | | ensuring that the buffer contents are zeroed on allocation and not leaked when resizing. It is worth noting that BUF_MEM_grow_clean() already did this manually by avoiding realloc(). ok beck@ inoguchi@
* Use calloc() instead of malloc() followed by manually zeroing fields.jsing2017-03-161-6/+3
| | | | ok beck@ inoguchi@
* Send the function codes from the error functions to the bit bucket,beck2017-01-291-6/+6
| | | | | | as was done earlier in libssl. Thanks inoguchi@ for noticing libssl had more reacharounds into this. ok jsing@ inoguchi@
* Only import cryptlib.h in the four source files that actually need it.jsing2014-07-111-2/+3
| | | | | | | | Remove the openssl public includes from cryptlib.h and add a small number of includes into the source files that actually need them. While here, also sort/group/tidy the includes. ok beck@ miod@
* Stop including standard headers via cryptlib.h - pull in the headers thatjsing2014-07-101-1/+3
| | | | | | are needed in the source files that actually require them. ok beck@ miod@
* Replace memset(a, 0, ...); free(a); by explicit_bzero(a, ...); free(a); inmiod2014-07-091-2/+2
| | | | | | | fear a smartass-optimizing compiler decides memset is useless immediately before free(). ok jsing@ deraadt@ tedu@
* tags as requested by miod and teduderaadt2014-06-121-1/+1
|
* realloc with NULL is same as mallocderaadt2014-06-011-4/+1
| | | | ok guenther
* Commit this before the head-scratching leads to premature baldness:deraadt2014-06-011-1/+1
| | | | | | | | | | | | | memset(a->data, 0, (unsigned int)a->max); but the decl is: size_t max; size_t could be larger than int, especially in some of the systems OpenSSL purports to support. How do _intentionally truncating_ casts like enter into a codebase? Lack of understanding of C, at a minimum. Generally the objects are small, but this code is _intentionally unready_ for large objects. ok miod
* More KNF.jsing2014-04-261-5/+6
|
* remove OPENSSL_realloc_clean usage here - replace with intrinsics to makebeck2014-04-171-4/+7
| | | | | it obvious what should happen. ok tedu@
* Initial KNF.jsing2014-04-171-104/+91
|
* Change library to use intrinsic memory allocation functions instead ofbeck2014-04-171-6/+6
| | | | | | | | OPENSSL_foo wrappers. This changes: OPENSSL_malloc->malloc OPENSSL_free->free OPENSSL_relloc->realloc OPENSSL_freeFunc->free
* Merge conflicts; remove MacOS, Netware, OS/2, VMS and Windows build machinery.miod2014-04-131-2/+2
|
* resolve conflictsdjm2012-10-131-59/+1
|
* cherrypick fix for CVE-2012-2110: libcrypto ASN.1 parsing heap overflowdjm2012-04-191-0/+17
| | | | ok miod@ deraadt@
* resolve conflicts, fix local changesdjm2010-10-011-4/+85
|
* resolve conflictsdjm2009-01-091-58/+0
|
* resolve conflictsdjm2008-09-061-6/+25
|
* merge 0.9.7b with local changes; crank majors for libssl/libcryptomarkus2003-05-121-0/+57
|
* OpenSSL 0.9.7 stable 2002 05 08 mergebeck2002-05-151-1/+2
|
* openssl-engine-0.9.6 mergebeck2000-12-151-6/+6
|
* OpenSSL 0.9.4 mergebeck1999-09-291-13/+12
|
* Import of SSLeay-0.9.0b with RSA and IDEA stubbed + OpenBSD buildryker1998-10-051-0/+145
functionality for shared libs. Note that routines such as sslv2_init and friends that use RSA will not work due to lack of RSA in this library. Needs documentation and help from ports for easy upgrade to full functionality where legally possible.