Skip to content

Commit

Permalink
Merge pull request #287 from amirlivneh/assert-settings
Browse files Browse the repository at this point in the history
Assert settings
  • Loading branch information
tatsuhiro-t authored Dec 31, 2024
2 parents 87bb001 + c8b28c7 commit 693af7e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/nghttp3_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,11 @@ static int conn_new(nghttp3_conn **pconn, int server, int callbacks_version,
(void)callbacks_version;
(void)settings_version;

assert(settings->max_field_section_size <= NGHTTP3_VARINT_MAX);
assert(settings->qpack_max_dtable_capacity <= NGHTTP3_VARINT_MAX);
assert(settings->qpack_encoder_max_dtable_capacity <= NGHTTP3_VARINT_MAX);
assert(settings->qpack_blocked_streams <= NGHTTP3_VARINT_MAX);

if (mem == NULL) {
mem = nghttp3_mem_default();
}
Expand Down

0 comments on commit 693af7e

Please sign in to comment.