tomaswolf commented on code in PR #267:
URL: https://github.com/apache/mina-sshd/pull/267#discussion_r1019652136
##########
sshd-common/src/main/java/org/apache/sshd/common/channel/PtyChannelConfiguration.java:
##########
@@ -94,6 +95,8 @@ public Map<PtyMode, Integer> getPtyModes() {
@Override
public void setPtyModes(Map<PtyMode, Integer> ptyModes) {
+ ptyModes.forEach(
+ (key, value) -> BufferUtils.validateUint32Value(value, "Mode %s
has invalid value %s", key, value));
Review Comment:
Make a copy of the map? The caller might add more values afterwards... And
should getPtyModes() return a read-only copy?
--
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]