Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: source/tls_socket.h
- Revision:
- 18:f7a85895a941
- Parent:
- 15:ffc77f212382
- Child:
- 27:42b319540a74
--- 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);