linux-dmabuf: Don't add invalid planes


In the buffer_params_v1_add request handler, we would post a protocol
error for an invalid plane (e.g. outside the valid range) but then we
would add it to the internal map. Since the protocol error will shut
down the client, we would never use this index for anything, so it
would not cause any problems in practice, but it could easily raise
some eyebrows. Especially since the index is used to index a static
length array later, so it has to be within the valid range or it
could cause an OOB write (but again, it would not happen in this case
since the client is disconnected).

Pick-to: 6.12
Task-number: QTBUG-148611
Change-Id: I2833521dee008f9e8bb33aadf031830a327d487c
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
commit9bc4ac3f02a0a964eab4e032d299efcab9a26df4
parentf8824c583a4bab1cb334fcb5d57c7e72c5c83ca3
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
commit timeThu, 30 Jul 2026 09:35:05 +0000