TLS layer: c->rtls to optimise recvd TLS data

This commit is contained in:
cpq authored and Sergey Lyubka committed 2023-12-10 12:18:07 +00:00
1 parent 98d877c5f0
commit 144c2f443e
12 files changed
+248 -120

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
mg_log_set(MG_LL_NONE);
mg_log_set(MG_LL_INFO);
struct mg_dns_message dm;
mg_dns_parse(data, size, &dm);
+1 -1
View File
@@ -3136,7 +3136,7 @@ static void producer(void *param) {
size_t len, ofs = sizeof(tmp);
for (s_out = 0; s_out < NMESSAGES; s_out++) {
if (ofs >= sizeof(tmp)) mg_random(tmp, sizeof(tmp)), ofs = 0;
len = ((uint8_t *) tmp)[ofs] % 55 + 1;
len = ((uint8_t *) tmp)[ofs] % 55U + 1U;
if (ofs + len > sizeof(tmp)) len = sizeof(tmp) - ofs;
while ((mg_queue_book(q, &buf, len)) < len) (void) 0;
memcpy(buf, &tmp[ofs], len);