diff options
author | Michael Dawson <mdawson@devrus.com> | 2022-03-10 11:53:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-10 11:53:05 +0300 |
commit | 82342c2a54d065ede19acab02e04e096f8318d72 (patch) | |
tree | 94440414ac022e4ece6dc88a697698b928cbdc30 /src/node_http2.cc | |
parent | a7164fdd1a27c30f425d96f6a9392da5418751ee (diff) |
http2: fix potential integer overflow
Fix report from coverity on potential integer overflow
in http2.
Signed-off-by: Michael Dawson <mdawson@devrus.com>
PR-URL: https://github.com/nodejs/node/pull/42248
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'src/node_http2.cc')
-rw-r--r-- | src/node_http2.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_http2.cc b/src/node_http2.cc index c498d9ce122..cf1aa81d32c 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -197,7 +197,8 @@ Http2Options::Http2Options(Http2State* http2_state, SessionType type) { // Important: The maxSessionMemory option in javascript is expressed in // terms of MB increments (i.e. the value 1 == 1 MB) if (flags & (1 << IDX_OPTIONS_MAX_SESSION_MEMORY)) - set_max_session_memory(buffer[IDX_OPTIONS_MAX_SESSION_MEMORY] * 1000000); + set_max_session_memory(buffer[IDX_OPTIONS_MAX_SESSION_MEMORY] * + static_cast<uint64_t>(1000000)); if (flags & (1 << IDX_OPTIONS_MAX_SETTINGS)) { nghttp2_option_set_max_settings( |