Potential buffer overwrite in pem_write_buffer() fixed

Length indication when given a too small buffer was off.
Added regression test in test_suite_pem to detect this.
This commit is contained in:
Paul Bakker 2014-04-11 13:28:43 +02:00
parent d6ad8e949b
commit 1630058dde
7 changed files with 74 additions and 2 deletions

View file

@ -1,6 +1,14 @@
#include <stdio.h>
#include <string.h>
#if defined(POLARSSL_PLATFORM_C)
#include "polarssl/platform.h"
#else
#define polarssl_printf printf
#define polarssl_malloc malloc
#define polarssl_free free
#endif
static int test_errors = 0;
SUITE_PRE_DEP