TLS: fix memory accesses in QUIC transport parameters extension

This commit is contained in:
Nardi Ivan
2020-09-10 18:19:18 +02:00
parent 7d5a0e1f04
commit 8db084ab06
2 changed files with 37 additions and 4 deletions
+16
View File
@@ -170,6 +170,22 @@ int quic_len(const uint8_t *buf, uint64_t *value)
return 0;
}
}
int quic_len_buffer_still_required(uint8_t value)
{
switch(value >> 6) {
case 0:
return 0;
case 1:
return 1;
case 2:
return 3;
case 3:
return 7;
default: /* No Possible */
return 0;
}
}
static uint16_t gquic_get_u16(const uint8_t *buf, uint32_t version)
{