[PATCH 8/9] station: check return when advancing iterator

James Prestwood
2025-04-16T12:34:26Z

---
src/station.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/station.c b/src/station.c
index 9972ea76..14c93671 100644
--- a/src/station.c
+++ b/src/station.c
@@ -4836,7 +4836,8 @@ static struct l_dbus_message *station_property_set_affinities(
return dbus_error_invalid_args(message);

/* Get first entry, there should be only one */
- l_dbus_message_iter_next_entry(&array, &new_path);
+ if (!l_dbus_message_iter_next_entry(&array, &new_path))
+ return dbus_error_invalid_args(message);

if (l_dbus_message_iter_next_entry(&array, &new_path))
return dbus_error_invalid_args(message);
--
2.34.1