spa: libcamera: source: avoid iterator overrun when enumerating controls

Do not overrun the iterator when skipping the initial couple items.
This commit is contained in:
Barnabás Pőcze 2025-07-23 13:01:21 +02:00 committed by Wim Taymans
parent 6f058e6b0d
commit a858290e4b

View file

@ -774,7 +774,7 @@ spa_libcamera_enum_controls(struct impl *impl, struct port *port, int seq,
result.next = start; result.next = start;
auto it = info.begin(); auto it = info.begin();
for (skip = result.next - offset; skip; skip--) for (skip = result.next - offset; skip && it != info.end(); skip--)
it++; it++;
if (false) { if (false) {