Fix corner case uses of memory_buffer_alloc.c

The corner cases fixed include:
    * Allocating a buffer of size 0. With this change, the allocator now
      returns a NULL pointer in this case. Note that changes in pem.c and
      x509_crl.c were required to fix tests that did not work under this
      assumption.
    * Initialising the allocator with less memory than required for headers.
    * Fix header chain checks for uninitialised allocator.
This commit is contained in:
Andres AG 2017-01-30 14:34:25 +00:00 committed by Andres Amaya Garcia
parent d1a26f19c9
commit 9cf1f96a7b
4 changed files with 24 additions and 15 deletions

View file

@ -104,6 +104,8 @@ Bugfix
* Fix error message in programs/pkey/gen_key.c. Found and fixed by Chris Xue.
* Fix programs/pkey/dh_server.c so that it actually works with dh_client.c.
Found and fixed by Martijn de Milliano.
* Fix memory allocation corner cases in memory_buffer_alloc.c module. Found
by Guido Vranken. #639
Changes
* Extend cert_write example program by options to set the CRT version