mbed-http
Fork of mbed-http by
Diff: source/tls_socket.h
- Revision:
- 18:f7a85895a941
- Parent:
- 15:ffc77f212382
--- a/source/tls_socket.h Mon Jul 31 15:36:33 2017 +0200
+++ b/source/tls_socket.h Mon Sep 04 16:31:38 2017 +0100
@@ -161,7 +161,7 @@
if (_debug) mbedtls_printf("TLS connection to %s:%d established\r\n", _hostname, _port);
const uint32_t buf_size = 1024;
- char *buf = new char[buf_size];
+ char buf[buf_size] = { 0 };
mbedtls_x509_crt_info(buf, buf_size, "\r ",
mbedtls_ssl_get_peer_cert(&_ssl));
if (_debug) mbedtls_printf("Server certificate:\r\n%s\r", buf);
