Skip to content

Commit 097cdb6

Browse files
elmarcoCBenoit
authored andcommitted
fix(pdu): TS_RFX_CHANNELT width/height SHOULD be within range
According to the specification, the value does not need to be in the range: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdprfx/4060f07e-9d73-454d-841e-131a93aca675 (the ironrdp-server can send larger values) Signed-off-by: Marc-André Lureau <[email protected]>
1 parent 92dd927 commit 097cdb6

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

crates/ironrdp-pdu/src/codecs/rfx/header_messages.rs

+2-11
Original file line numberDiff line numberDiff line change
@@ -232,17 +232,8 @@ impl<'de> Decode<'de> for RfxChannel {
232232
return Err(invalid_field_err!("channelId", "Invalid channel ID"));
233233
}
234234

235-
let width = src.read_i16();
236-
if !(1..=4096).contains(&width) {
237-
return Err(invalid_field_err!("width", "Invalid channel width"));
238-
}
239-
let width = RfxChannelWidth::new(width);
240-
241-
let height = src.read_i16();
242-
if !(1..=2048).contains(&height) {
243-
return Err(invalid_field_err!("height", "Invalid channel height"));
244-
}
245-
let height = RfxChannelHeight::new(height);
235+
let width = RfxChannelWidth::new(src.read_i16());
236+
let height = RfxChannelHeight::new(src.read_i16());
246237

247238
Ok(Self { width, height })
248239
}

0 commit comments

Comments
 (0)