File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5859,8 +5859,17 @@ enum {
58595859
58605860/* 64-bit epoch + 64-bit sequence number */
58615861#define DTLS13_RN_SIZE (OPAQUE64_LEN + OPAQUE64_LEN)
5862- /* Maximum number of ACK records encodable in the word16 length field */
5863- #define DTLS13_ACK_MAX_RECORDS ((int)(WOLFSSL_MAX_16BIT / DTLS13_RN_SIZE))
5862+ /* Maximum number of ACK records allowed in a ACK record */
5863+ #ifndef DTLS13_ACK_MAX_RECORDS
5864+ #define DTLS13_ACK_MAX_RECORDS 128
5865+ #endif
5866+ /* WOLFSSL_MAX_16BIT / DTLS13_RN_SIZE (0xffff / (OPAQUE64_LEN + OPAQUE64_LEN))
5867+ * Literals are used because OPAQUE64_LEN is an enum value, invisible to the
5868+ * preprocessor. */
5869+ #if DTLS13_ACK_MAX_RECORDS > 0xffff / 16
5870+ #error "DTLS13_ACK_MAX_RECORDS exceeds the maximum encodable in the word16 length field"
5871+ #endif
5872+
58645873
58655874typedef struct Dtls13Epoch {
58665875 w64wrapper epochNumber ;
You can’t perform that action at this time.
0 commit comments