mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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>
This commit is contained in:
1 parent
701dc14fdf
commit
88dee3c6b5
1 file changed
+2
-1
+2
-1
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user