aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/mem.c
Commit message (Collapse)AuthorAgeFilesLines
* CRYPTO_malloc(), CRYPTO_realloc() and variants of them should return NULLRichard Levitte2003-12-011-4/+4
| | | | | | if the give size is 0. This is a thought that came up in PR 751.
* In realloc, don't destroy the old memory area if a new one couldn't beRichard Levitte2003-10-071-3/+7
| | | | | allocated. Notified by Daniel Lucq <daniel@lucq.org>
* Make sure the memory allocation routines check for negative sizesRichard Levitte2003-02-191-0/+10
|
* Cleanse memory using the new OPENSSL_cleanse() function.Richard Levitte2002-11-281-1/+1
| | | | I've covered all the memset()s I felt safe modifying, but may have missed some.
* Add OPENSSL_cleanse() to help cleanse memory and avoid certain compilerRichard Levitte2002-11-271-0/+14
| | | | | and linker optimizations. PR: 343
* Security fixes brought forward from 0.9.7.Ben Laurie2002-11-131-2/+23
|
* If CRYPTO_realloc() is called with a NULL pointer, have it callRichard Levitte2002-08-011-0/+3
| | | | | OPENSSL_malloc(). PR: 187
* No functional change, but slightly improved code clarity.Bodo Möller2001-01-101-3/+6
|
* After discussion with Richard, change the new API for extended memoryBodo Möller2001-01-101-56/+51
| | | | | | allocation callbacks so that it is no longer visible to applications that these live at a different call level than conventional memory allocation callbacks.
* make indentation consistentBodo Möller2001-01-101-14/+14
|
* As response to a user request to be able to use external memoryRichard Levitte2001-01-101-5/+84
| | | | | | handling routines that need file name and line number information, I've added a call level to our memory handling routines to allow that kind of hooking.
* Constification of the data of a hash table. This means the callbackRichard Levitte2000-12-131-10/+10
| | | | | | | functions need to be constified, and therefore meant a number of easy changes a little everywhere. Now, if someone could explain to me why OBJ_dup() cheats...
* There have been a number of complaints from a number of sources that namesRichard Levitte2000-06-011-2/+2
| | | | | | | | | like Malloc, Realloc and especially Free conflict with already existing names on some operating systems or other packages. That is reason enough to change the names of the OpenSSL memory allocation macros to something that has a better chance of being unique, like prepending them with OPENSSL_. This change includes all the name changes needed throughout all C files.
* In Message-ID: <003201bfb332$14a07520$0801a8c0@janm.transactionsite.com>,Richard Levitte2000-05-021-18/+29
| | | | | | | | | | | | "Jan Mikkelsen" <janm@transactionsite.com> correctly states that the OpenSSL header files have #include's and extern "C"'s in an incorrect order. Thusly fixed. Also, make the memory debugging routines defined and declared with prototypes, and use void* instead of char* for memory blobs. And last of all, redo the ugly callback construct for elegance and better definition (with prototypes).
* Make gcc 2.95.2 happy again, even under ``-Wall -Wshadow -Wpointer-arith ↵Ralf S. Engelschall2000-02-111-1/+1
| | | | | | -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline''.
* Source code cleanups: Use void * rather than char * in lhash,Ulf Möller2000-01-301-4/+4
| | | | eliminate some of the -Wcast-qual warnings (debug-ben-strict target)
* Late break-in patch for MacOS support.Andy Polyakov1999-12-191-1/+1
|
* - Don't assume that int and size_t have the same representationBodo Möller1999-12-181-37/+73
| | | | | | | | (and that malloc can be called with an int argument). - Use proper prototypes (with argument list) for various function pointers, avoid casts (however there are still many such cases left in these files). - Avoid collissions in app_info_cmp if sizeof int != sizeof long. - Use CRYPTO_LOCK_MALLOC in mem_dbg.c.
* - Added more documentation in CHANGES.Richard Levitte1999-12-181-12/+32
| | | | | | | | | | | | - Made CRYPTO_MDEBUG even less used in crypto.h, giving MemCheck_start() and MemCheck_stop() only one possible definition. - Made the values of the debug function pointers in mem.c dependent on the existence of the CRYPTO_MDEBUG macro, and made the rest of the code understand the NULL case. That's it. With this code, the old behvior of the debug functionality is restored, but you can still opt to have it on, even when the library wasn't compiled with a defined CRYPTO_MDEBUG.
* Rebuild of the OpenSSL memory allocation and deallocation routines.Richard Levitte1999-12-171-538/+72
| | | | | | | | | | | | | | | | | | | | | | | With this change, the following is provided and present at all times (meaning CRYPTO_MDEBUG is no longer required to get this functionality): - hooks to provide your own allocation and deallocation routines. They have to have the same interface as malloc(), realloc() and free(). They are registered by calling CRYPTO_set_mem_functions() with the function pointers. - hooks to provide your own memory debugging routines. The have to have the same interface as as the CRYPTO_dbg_*() routines. They are registered by calling CRYPTO_set_mem_debug_functions() with the function pointers. I moved everything that was already built into OpenSSL and did memory debugging to a separate file (mem_dbg.c), to make it clear what is what. With this, the relevance of the CRYPTO_MDEBUG has changed. The only thing in crypto/crypto.h that it affects is the definition of the MemCheck_start and MemCheck_stop macros.
* The info removal code was overcomplicated, and error-prone (references being ↵Richard Levitte1999-11-121-24/+11
| | | | wrongly decreased). Fixed.
* Avoid deadlock.Bodo Möller1999-11-121-1/+15
|
* Avoid some silly compiler warnings, and add the change log I forgot :-)Richard Levitte1999-11-121-3/+3
|
* Two changes have been made:Richard Levitte1999-11-121-16/+257
| | | | | | | | | | | | | 1. Added code to the memory leak detecting code to give the user the possibility to add information, thereby forming a traceback. 2. Make the memory leak detecting code multithread-safe. The idea is that we're actually dealing with two separate critical sections, one containing the hash tables with the information, the other containing the current memory checking mode. Those should not be handled with the same lock, especially since their handling overlap. Hence, the added second lock.
* New compile time option -DCRYPTO_MDEBUG_THREAD.Bodo Möller1999-07-191-8/+29
|
* Have CRYPTO_MDEBUG_TIME automatically set CRYPTO_MDEBUG,Bodo Möller1999-07-191-0/+1
| | | | and make it the default for some debugging configurations.
* Add optional (compile-time configurable) time to CRYPTO_mem_leaks output.Bodo Möller1999-07-181-0/+18
| | | | | This is much more helpful than the counter when doing tests with the library interactively.
* Fix memory checking.Bodo Möller1999-07-091-10/+24
|
* Avoid warnings.Bodo Möller1999-06-101-2/+2
|
* Don't mix real tabs with tabs expanded as 8 spaces -- that'sBodo Möller1999-06-071-2/+2
| | | | a pain to read when using 4-space tabs.
* Change #include filenames from <foo.h> to <openssl.h>.Bodo Möller1999-04-231-3/+3
| | | | | | Submitted by: Reviewed by: PR:
* Change functions to ANSI C.Ulf Möller1999-04-191-62/+22
|
* Massive constification.Ben Laurie1999-04-171-4/+4
|
* Rid the world of more evil casts.Ben Laurie1999-04-101-14/+14
|
* Update dependencies.Ben Laurie1999-02-271-0/+2
|
* Import of old SSLeay release: SSLeay 0.9.1b (unreleased)Ralf S. Engelschall1998-12-211-12/+72
|
* Import of old SSLeay release: SSLeay 0.9.0bRalf S. Engelschall1998-12-211-8/+6
|
* Import of old SSLeay release: SSLeay 0.8.1bRalf S. Engelschall1998-12-211-0/+355