ok2c commented on code in PR #713:
URL:
https://github.com/apache/httpcomponents-core/pull/713#discussion_r4165067905
##########
httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java:
##########
@@ -1268,17 +1263,19 @@ private void consumeSettingsFrame(final ByteBuffer
payload) throws IOException {
final H2Param param = H2Param.valueOf(code);
if (param != null) {
validateSetting(param, value);
+ final long unsignedValue = Integer.toUnsignedLong(value);
+ final int effectiveValue = (int) Math.min(unsignedValue,
Integer.MAX_VALUE);
Review Comment:
@arturobernalg This still does not look right. We should be using long
value instead of truncated int unless that value is really known to hold 2^31−1
values only.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]