diff --git a/include/gmssl/tls.h b/include/gmssl/tls.h index 4479208f6..cb15829f6 100644 --- a/include/gmssl/tls.h +++ b/include/gmssl/tls.h @@ -718,7 +718,7 @@ typedef struct { uint8_t record[TLS_MAX_RECORD_SIZE]; - uint8_t databuf[TLS_MAX_PLAINTEXT_SIZE]; + uint8_t databuf[TLS_MAX_RECORD_SIZE]; uint8_t *data; size_t datalen; diff --git a/src/debug.c b/src/debug.c index 1e929fd05..d9d36c858 100644 --- a/src/debug.c +++ b/src/debug.c @@ -61,7 +61,7 @@ int format_bytes(FILE *fp, int format, int indent, const char *str, const uint8_ { int i; - if (datalen > 4096) { + if (datalen > (1<<24)) { error_print(); return -1; }