Skip to content

Commit cb3be3e

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update nghttp2 to 1.71.0
PR-URL: #67331 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tim Perry <pimterry@gmail.com>
1 parent 70d664a commit cb3be3e

13 files changed

Lines changed: 340 additions & 183 deletions

‎deps/nghttp2/lib/Makefile.in‎

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Makefile.in generated by automake 1.16.5 from Makefile.am.
1+
# Makefile.in generated by automake 1.18.1 from Makefile.am.
22
# @configure_input@
33

4-
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
4+
# Copyright (C) 1994-2025 Free Software Foundation, Inc.
55

66
# This Makefile.in is free software; the Free Software Foundation
77
# gives unlimited permission to copy and/or distribute it,
@@ -86,6 +86,8 @@ am__make_running_with_option = \
8686
test $$has_opt = yes
8787
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
8888
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
89+
am__rm_f = rm -f $(am__rm_f_notfound)
90+
am__rm_rf = rm -rf $(am__rm_f_notfound)
8991
pkgdatadir = $(datadir)/@PACKAGE@
9092
pkgincludedir = $(includedir)/@PACKAGE@
9193
pkglibdir = $(libdir)/@PACKAGE@
@@ -141,10 +143,9 @@ am__base_list = \
141143
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
142144
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
143145
am__uninstall_files_from_dir = { \
144-
test -z "$$files" \
145-
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
146-
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
147-
$(am__cd) "$$dir" && rm -f $$files; }; \
146+
{ test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
147+
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
148+
$(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \
148149
}
149150
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)"
150151
LTLIBRARIES = $(lib_LTLIBRARIES)
@@ -436,8 +437,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
436437
am__include = @am__include@
437438
am__leading_dot = @am__leading_dot@
438439
am__quote = @am__quote@
440+
am__rm_f_notfound = @am__rm_f_notfound@
439441
am__tar = @am__tar@
440442
am__untar = @am__untar@
443+
am__xargs_n = @am__xargs_n@
441444
bindir = @bindir@
442445
build = @build@
443446
build_alias = @build_alias@
@@ -612,15 +615,13 @@ uninstall-libLTLIBRARIES:
612615
done
613616

614617
clean-libLTLIBRARIES:
615-
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
618+
-$(am__rm_f) $(lib_LTLIBRARIES)
616619
@list='$(lib_LTLIBRARIES)'; \
617620
locs=`for p in $$list; do echo $$p; done | \
618621
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
619622
sort -u`; \
620-
test -z "$$locs" || { \
621-
echo rm -f $${locs}; \
622-
rm -f $${locs}; \
623-
}
623+
echo rm -f $${locs}; \
624+
$(am__rm_f) $${locs}
624625

625626
libnghttp2.la: $(libnghttp2_la_OBJECTS) $(libnghttp2_la_DEPENDENCIES) $(EXTRA_libnghttp2_la_DEPENDENCIES)
626627
$(AM_V_CCLD)$(libnghttp2_la_LINK) -rpath $(libdir) $(libnghttp2_la_OBJECTS) $(libnghttp2_la_LIBADD) $(LIBS)
@@ -660,7 +661,7 @@ distclean-compile:
660661

661662
$(am__depfiles_remade):
662663
@$(MKDIR_P) $(@D)
663-
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
664+
@: >>$@
664665

665666
am--depfiles: $(am__depfiles_remade)
666667

@@ -813,6 +814,7 @@ cscopelist-am: $(am__tagged_files)
813814

814815
distclean-tags:
815816
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
817+
816818
distdir: $(BUILT_SOURCES)
817819
$(MAKE) $(AM_MAKEFLAGS) distdir-am
818820

@@ -903,9 +905,9 @@ mostlyclean-generic:
903905
clean-generic:
904906

905907
distclean-generic:
906-
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
907-
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
908-
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
908+
-$(am__rm_f) $(CONFIG_CLEAN_FILES)
909+
-test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
910+
-$(am__rm_f) $(DISTCLEANFILES)
909911

910912
maintainer-clean-generic:
911913
@echo "This command is intended for maintainers to use"
@@ -916,7 +918,7 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
916918
mostlyclean-am
917919

918920
distclean: distclean-recursive
919-
-rm -f ./$(DEPDIR)/nghttp2_alpn.Plo
921+
-rm -f ./$(DEPDIR)/nghttp2_alpn.Plo
920922
-rm -f ./$(DEPDIR)/nghttp2_buf.Plo
921923
-rm -f ./$(DEPDIR)/nghttp2_callbacks.Plo
922924
-rm -f ./$(DEPDIR)/nghttp2_debug.Plo
@@ -987,7 +989,7 @@ install-ps-am:
987989
installcheck-am:
988990

989991
maintainer-clean: maintainer-clean-recursive
990-
-rm -f ./$(DEPDIR)/nghttp2_alpn.Plo
992+
-rm -f ./$(DEPDIR)/nghttp2_alpn.Plo
991993
-rm -f ./$(DEPDIR)/nghttp2_buf.Plo
992994
-rm -f ./$(DEPDIR)/nghttp2_callbacks.Plo
993995
-rm -f ./$(DEPDIR)/nghttp2_debug.Plo
@@ -1055,3 +1057,10 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgconfigDATA
10551057
# Tell versions [3.59,3.63) of GNU make to not export all variables.
10561058
# Otherwise a system limit (for SysV at least) may be exceeded.
10571059
.NOEXPORT:
1060+
1061+
# Tell GNU make to disable its built-in pattern rules.
1062+
%:: %,v
1063+
%:: RCS/%,v
1064+
%:: RCS/%
1065+
%:: s.%
1066+
%:: SCCS/s.%

‎deps/nghttp2/lib/includes/Makefile.in‎

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Makefile.in generated by automake 1.16.5 from Makefile.am.
1+
# Makefile.in generated by automake 1.18.1 from Makefile.am.
22
# @configure_input@
33

4-
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
4+
# Copyright (C) 1994-2025 Free Software Foundation, Inc.
55

66
# This Makefile.in is free software; the Free Software Foundation
77
# gives unlimited permission to copy and/or distribute it,
@@ -93,6 +93,8 @@ am__make_running_with_option = \
9393
test $$has_opt = yes
9494
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
9595
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
96+
am__rm_f = rm -f $(am__rm_f_notfound)
97+
am__rm_rf = rm -rf $(am__rm_f_notfound)
9698
pkgdatadir = $(datadir)/@PACKAGE@
9799
pkgincludedir = $(includedir)/@PACKAGE@
98100
pkglibdir = $(libdir)/@PACKAGE@
@@ -168,10 +170,9 @@ am__base_list = \
168170
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
169171
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
170172
am__uninstall_files_from_dir = { \
171-
test -z "$$files" \
172-
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
173-
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
174-
$(am__cd) "$$dir" && rm -f $$files; }; \
173+
{ test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
174+
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
175+
$(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \
175176
}
176177
am__installdirs = "$(DESTDIR)$(includedir)"
177178
HEADERS = $(nobase_include_HEADERS)
@@ -341,8 +342,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
341342
am__include = @am__include@
342343
am__leading_dot = @am__leading_dot@
343344
am__quote = @am__quote@
345+
am__rm_f_notfound = @am__rm_f_notfound@
344346
am__tar = @am__tar@
345347
am__untar = @am__untar@
348+
am__xargs_n = @am__xargs_n@
346349
bindir = @bindir@
347350
build = @build@
348351
build_alias = @build_alias@
@@ -508,6 +511,7 @@ cscopelist-am: $(am__tagged_files)
508511

509512
distclean-tags:
510513
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
514+
511515
distdir: $(BUILT_SOURCES)
512516
$(MAKE) $(AM_MAKEFLAGS) distdir-am
513517

@@ -572,8 +576,8 @@ mostlyclean-generic:
572576
clean-generic:
573577

574578
distclean-generic:
575-
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
576-
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
579+
-$(am__rm_f) $(CONFIG_CLEAN_FILES)
580+
-test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
577581

578582
maintainer-clean-generic:
579583
@echo "This command is intended for maintainers to use"
@@ -666,3 +670,10 @@ uninstall-am: uninstall-nobase_includeHEADERS
666670
# Tell versions [3.59,3.63) of GNU make to not export all variables.
667671
# Otherwise a system limit (for SysV at least) may be exceeded.
668672
.NOEXPORT:
673+
674+
# Tell GNU make to disable its built-in pattern rules.
675+
%:: %,v
676+
%:: RCS/%,v
677+
%:: RCS/%
678+
%:: s.%
679+
%:: SCCS/s.%

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

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -465,10 +465,10 @@ typedef enum {
465465
/**
466466
* Possible flooding by peer was detected in this HTTP/2 session.
467467
* Flooding is measured by how many PING and SETTINGS frames with
468-
* ACK flag set are queued for transmission. These frames are
469-
* response for the peer initiated frames, and peer can cause memory
470-
* exhaustion on server side to send these frames forever and does
471-
* not read network.
468+
* ACK flag set are queued for transmission, and the size of the
469+
* outbound queue. These frames are response for the peer initiated
470+
* frames, and peer can cause memory exhaustion on server side to
471+
* send these frames forever and does not read network.
472472
*/
473473
NGHTTP2_ERR_FLOODED = -904,
474474
/**
@@ -3258,6 +3258,21 @@ NGHTTP2_EXTERN void nghttp2_option_set_glitch_rate_limit(nghttp2_option *option,
32583258
uint64_t burst,
32593259
uint64_t rate);
32603260

3261+
/**
3262+
* @function
3263+
*
3264+
* This function sets the maximum number of frames allowed in the
3265+
* outbound queue. The limit is checked after
3266+
* `nghttp2_session_mem_recv2()` and `nghttp2_session_recv()`. The
3267+
* current queue size (excluding deferred DATA frames) can be obtained
3268+
* by `nghttp2_session_get_outbound_queue_size()`. If it exceeds
3269+
* |val|, `nghttp2_session_mem_recv2()` and `nghttp2_session_recv()`
3270+
* return :enum:`nghttp2_error.NGHTTP2_ERR_FLOODED`. The default
3271+
* value is 5000.
3272+
*/
3273+
NGHTTP2_EXTERN void
3274+
nghttp2_option_set_max_outbound_queue_size(nghttp2_option *option, size_t val);
3275+
32613276
/**
32623277
* @function
32633278
*
@@ -4581,6 +4596,8 @@ NGHTTP2_EXTERN int32_t nghttp2_submit_request(
45814596
* reached.
45824597
* :enum:`nghttp2_error.NGHTTP2_ERR_PROTO`
45834598
* The |session| is server session.
4599+
* :enum:`nghttp2_error.NGHTTP2_ERR_INVALID_ARGUMENT`
4600+
* The required memory for |nva| of length |nvlen| is too large.
45844601
*
45854602
* .. warning::
45864603
*
@@ -4724,7 +4741,8 @@ nghttp2_submit_response(nghttp2_session *session, int32_t stream_id,
47244741
* :enum:`nghttp2_error.NGHTTP2_ERR_NOMEM`
47254742
* Out of memory.
47264743
* :enum:`nghttp2_error.NGHTTP2_ERR_INVALID_ARGUMENT`
4727-
* The |stream_id| is 0.
4744+
* The |stream_id| is 0; The required memory for |nva| of length
4745+
* |nvlen| is too large.
47284746
* :enum:`nghttp2_error.NGHTTP2_ERR_DATA_EXIST`
47294747
* DATA or HEADERS has been already submitted and not fully
47304748
* processed yet. Normally, this does not happen, but when
@@ -4794,7 +4812,8 @@ nghttp2_submit_response2(nghttp2_session *session, int32_t stream_id,
47944812
* :enum:`nghttp2_error.NGHTTP2_ERR_NOMEM`
47954813
* Out of memory.
47964814
* :enum:`nghttp2_error.NGHTTP2_ERR_INVALID_ARGUMENT`
4797-
* The |stream_id| is 0.
4815+
* The |stream_id| is 0; The required memory for |nva| of length
4816+
* |nvlen| is too large.
47984817
*/
47994818
NGHTTP2_EXTERN int nghttp2_submit_trailer(nghttp2_session *session,
48004819
int32_t stream_id,
@@ -4860,7 +4879,8 @@ NGHTTP2_EXTERN int nghttp2_submit_trailer(nghttp2_session *session,
48604879
* No stream ID is available because maximum stream ID was
48614880
* reached.
48624881
* :enum:`nghttp2_error.NGHTTP2_ERR_INVALID_ARGUMENT`
4863-
* The |stream_id| is 0.
4882+
* The |stream_id| is 0; The required memory for |nva| of length
4883+
* |nvlen| is too large.
48644884
* :enum:`nghttp2_error.NGHTTP2_ERR_DATA_EXIST`
48654885
* DATA or HEADERS has been already submitted and not fully
48664886
* processed yet. This happens if stream denoted by |stream_id|
@@ -5087,8 +5107,8 @@ NGHTTP2_EXTERN int nghttp2_submit_rst_stream(nghttp2_session *session,
50875107
* copies all the elements in the |iv|.
50885108
*
50895109
* While updating individual stream's local window size, if the window
5090-
* size becomes strictly larger than NGHTTP2_MAX_WINDOW_SIZE,
5091-
* RST_STREAM is issued against such a stream.
5110+
* size becomes strictly larger than NGHTTP2_MAX_WINDOW_SIZE, GOAWAY
5111+
* frame is submitted and the connection will be terminated.
50925112
*
50935113
* SETTINGS with :enum:`nghttp2_flag.NGHTTP2_FLAG_ACK` is
50945114
* automatically submitted by the library and application could not
@@ -5162,7 +5182,8 @@ NGHTTP2_EXTERN int nghttp2_submit_settings(nghttp2_session *session,
51625182
* reached.
51635183
* :enum:`nghttp2_error.NGHTTP2_ERR_INVALID_ARGUMENT`
51645184
* The |stream_id| is 0; The |stream_id| does not designate stream
5165-
* that peer initiated.
5185+
* that peer initiated; The required memory for |nva| of length
5186+
* |nvlen| is too large.
51665187
* :enum:`nghttp2_error.NGHTTP2_ERR_STREAM_CLOSED`
51675188
* The stream was already closed; or the |stream_id| is invalid.
51685189
*

‎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.70.0"
32+
#define NGHTTP2_VERSION "1.71.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 0x014600
40+
#define NGHTTP2_VERSION_NUM 0x014700
4141

4242
#endif /* NGHTTP2VER_H */

‎deps/nghttp2/lib/nghttp2_frame.c‎

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,8 +1048,8 @@ void nghttp2_nv_array_sort(nghttp2_nv *nva, size_t nvlen) {
10481048
int nghttp2_nv_array_copy(nghttp2_nv **nva_ptr, const nghttp2_nv *nva,
10491049
size_t nvlen, nghttp2_mem *mem) {
10501050
size_t i;
1051-
uint8_t *data = NULL;
1052-
size_t buflen = 0;
1051+
uint8_t *data;
1052+
size_t buflen;
10531053
nghttp2_nv *p;
10541054

10551055
if (nvlen == 0) {
@@ -1058,18 +1058,32 @@ int nghttp2_nv_array_copy(nghttp2_nv **nva_ptr, const nghttp2_nv *nva,
10581058
return 0;
10591059
}
10601060

1061+
if (sizeof(nghttp2_nv) > SIZE_MAX / nvlen) {
1062+
return NGHTTP2_ERR_INVALID_ARGUMENT;
1063+
}
1064+
1065+
buflen = sizeof(nghttp2_nv) * nvlen;
1066+
10611067
for (i = 0; i < nvlen; ++i) {
10621068
/* + 1 for null-termination */
10631069
if ((nva[i].flags & NGHTTP2_NV_FLAG_NO_COPY_NAME) == 0) {
1070+
if (nva[i].namelen == SIZE_MAX ||
1071+
buflen > SIZE_MAX - nva[i].namelen - 1) {
1072+
return NGHTTP2_ERR_INVALID_ARGUMENT;
1073+
}
1074+
10641075
buflen += nva[i].namelen + 1;
10651076
}
10661077
if ((nva[i].flags & NGHTTP2_NV_FLAG_NO_COPY_VALUE) == 0) {
1078+
if (nva[i].valuelen == SIZE_MAX ||
1079+
buflen > SIZE_MAX - nva[i].valuelen - 1) {
1080+
return NGHTTP2_ERR_INVALID_ARGUMENT;
1081+
}
1082+
10671083
buflen += nva[i].valuelen + 1;
10681084
}
10691085
}
10701086

1071-
buflen += sizeof(nghttp2_nv) * nvlen;
1072-
10731087
*nva_ptr = nghttp2_mem_malloc(mem, buflen);
10741088

10751089
if (*nva_ptr == NULL) {

‎deps/nghttp2/lib/nghttp2_frame.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,8 @@ void nghttp2_nv_array_sort(nghttp2_nv *nva, size_t nvlen);
597597
*
598598
* NGHTTP2_ERR_NOMEM
599599
* Out of memory.
600+
* NGHTTP2_ERR_INVALID_ARGUMENT
601+
* The required memory for |nva| of length |nvlen| is too large.
600602
*/
601603
int nghttp2_nv_array_copy(nghttp2_nv **nva_ptr, const nghttp2_nv *nva,
602604
size_t nvlen, nghttp2_mem *mem);

‎deps/nghttp2/lib/nghttp2_helper.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ int nghttp2_increase_local_window_size(int32_t *local_window_size_ptr,
247247

248248
int nghttp2_should_send_window_update(int32_t local_window_size,
249249
int32_t recv_window_size) {
250-
return recv_window_size > 0 && recv_window_size >= local_window_size / 2;
250+
return recv_window_size > 0 && local_window_size > 0 &&
251+
recv_window_size >= local_window_size / 2;
251252
}
252253

253254
const char *nghttp2_strerror(int error_code) {

0 commit comments

Comments
 (0)