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.
diff --git a/ChangeLog b/ChangeLog
index ed7818e..65c5d65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -62,6 +62,8 @@
* Fix issue in RSA key generation program programs/x509/rsa_genkey
where the failure of CTR DRBG initialization lead to freeing an
RSA context without proper initialization beforehand.
+ * 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