Skip to content

Commit

Permalink
ncm: Cap datagram count to 16 for performance
Browse files Browse the repository at this point in the history
The layout computation could end up working its way down from a very
high number. Though we probably should optimize the layout computation,
there's no point for now.

Co-authored-by: Håvard Sørbø <[email protected]>
  • Loading branch information
oleavr and hsorbo committed Dec 17, 2024
1 parent c1472f9 commit a2ffb76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fruity/ncm.vala
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ namespace Frida.Fruity {
ndp_out_divisor = ntb_params.read_uint16 (20);
ndp_out_payload_remainder = ntb_params.read_uint16 (22);
ndp_out_alignment = ntb_params.read_uint16 (24);
ntb_out_max_datagrams = ntb_params.read_uint16 (26);
ntb_out_max_datagrams = uint16.min (ntb_params.read_uint16 (26), 16);

if (ntb_in_max_size != device_ntb_in_max_size) {
var ntb_size_buf = new BufferBuilder (LITTLE_ENDIAN)
Expand Down

0 comments on commit a2ffb76

Please sign in to comment.