Skip to content

Commit e7c69b9

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update nghttp2 to 1.65.0
PR-URL: #57269 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 0b987e5 commit e7c69b9

File tree

11 files changed

+1220
-2492
lines changed

11 files changed

+1220
-2492
lines changed

deps/nghttp2/lib/includes/nghttp2/nghttp2.h

Lines changed: 31 additions & 210 deletions
Large diffs are not rendered by default.

deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
* @macro
3030
* Version number of the nghttp2 library release
3131
*/
32-
#define NGHTTP2_VERSION "1.64.0"
32+
#define NGHTTP2_VERSION "1.65.0"
3333

3434
/**
3535
* @macro
3636
* Numerical representation of the version number of the nghttp2 library
3737
* release. This is a 24 bit number with 8 bits for major number, 8 bits
3838
* for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
3939
*/
40-
#define NGHTTP2_VERSION_NUM 0x014000
40+
#define NGHTTP2_VERSION_NUM 0x014100
4141

4242
#endif /* NGHTTP2VER_H */

deps/nghttp2/lib/nghttp2_hd.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,19 @@ static void hd_map_remove(nghttp2_hd_map *map, nghttp2_hd_entry *ent) {
594594
static int hd_ringbuf_init(nghttp2_hd_ringbuf *ringbuf, size_t bufsize,
595595
nghttp2_mem *mem) {
596596
size_t size;
597+
const size_t max_size = SIZE_MAX / sizeof(nghttp2_hd_entry *);
598+
599+
if (bufsize > max_size) {
600+
return NGHTTP2_ERR_NOMEM;
601+
}
602+
597603
for (size = 1; size < bufsize; size <<= 1)
598604
;
605+
606+
if (size > max_size) {
607+
return NGHTTP2_ERR_NOMEM;
608+
}
609+
599610
ringbuf->buffer = nghttp2_mem_malloc(mem, sizeof(nghttp2_hd_entry *) * size);
600611
if (ringbuf->buffer == NULL) {
601612
return NGHTTP2_ERR_NOMEM;

deps/nghttp2/lib/nghttp2_http.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ static int http_request_on_header(nghttp2_stream *stream, nghttp2_hd_nv *nv,
207207
if (!trailer &&
208208
/* Do not parse the header field in PUSH_PROMISE. */
209209
(stream->stream_id & 1) &&
210-
(stream->flags & NGHTTP2_STREAM_FLAG_NO_RFC7540_PRIORITIES) &&
211210
!(stream->http_flags & NGHTTP2_HTTP_FLAG_BAD_PRIORITY)) {
212211
nghttp2_extpri_from_uint8(&extpri, stream->http_extpri);
213212
if (nghttp2_http_parse_priority(&extpri, nv->value->base,
@@ -660,17 +659,17 @@ void nghttp2_http_record_request_method(nghttp2_stream *stream,
660659
int nghttp2_http_parse_priority(nghttp2_extpri *dest, const uint8_t *value,
661660
size_t valuelen) {
662661
nghttp2_extpri pri = *dest;
663-
sf_parser sfp;
664-
sf_vec key;
665-
sf_value val;
662+
sfparse_parser sfp;
663+
sfparse_vec key;
664+
sfparse_value val;
666665
int rv;
667666

668-
sf_parser_init(&sfp, value, valuelen);
667+
sfparse_parser_init(&sfp, value, valuelen);
669668

670669
for (;;) {
671-
rv = sf_parser_dict(&sfp, &key, &val);
670+
rv = sfparse_parser_dict(&sfp, &key, &val);
672671
if (rv != 0) {
673-
if (rv == SF_ERR_EOF) {
672+
if (rv == SFPARSE_ERR_EOF) {
674673
break;
675674
}
676675

@@ -683,15 +682,15 @@ int nghttp2_http_parse_priority(nghttp2_extpri *dest, const uint8_t *value,
683682

684683
switch (key.base[0]) {
685684
case 'i':
686-
if (val.type != SF_TYPE_BOOLEAN) {
685+
if (val.type != SFPARSE_TYPE_BOOLEAN) {
687686
return NGHTTP2_ERR_INVALID_ARGUMENT;
688687
}
689688

690689
pri.inc = val.boolean;
691690

692691
break;
693692
case 'u':
694-
if (val.type != SF_TYPE_INTEGER ||
693+
if (val.type != SFPARSE_TYPE_INTEGER ||
695694
val.integer < NGHTTP2_EXTPRI_URGENCY_HIGH ||
696695
NGHTTP2_EXTPRI_URGENCY_LOW < val.integer) {
697696
return NGHTTP2_ERR_INVALID_ARGUMENT;

0 commit comments

Comments
 (0)