Allow ssl_client to pad request to SSL_MAX_CONTENT_LEN
diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c
index ae9f738..c578c5b 100644
--- a/programs/ssl/ssl_server2.c
+++ b/programs/ssl/ssl_server2.c
@@ -430,7 +430,7 @@
int ret = 0, len, written, frags;
int listen_fd;
int client_fd = -1;
- unsigned char buf[1024];
+ unsigned char buf[SSL_MAX_CONTENT_LEN + 1];
#if defined(POLARSSL_KEY_EXCHANGE__SOME__PSK_ENABLED)
unsigned char psk[256];
size_t psk_len = 0;
@@ -1245,6 +1245,7 @@
}
len = ret;
+ buf[len] = '\0';
printf( " %d bytes read\n\n%s\n", len, (char *) buf );
if( memcmp( buf, "SERVERQUIT", 10 ) == 0 )