Skip to content

Commit 0084c4b

Browse files
committed
Check if number of arguments match the expected number
1 parent 7c20655 commit 0084c4b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libgstd/gstd_action.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@ gstd_action_create_default (GstdObject * object, const gchar * name,
230230
arg_list = g_strsplit (description, " ", query.n_params);
231231
}
232232

233+
if (g_strv_length (arg_list) != query.n_params) {
234+
return GSTD_NULL_ARGUMENT;
235+
}
236+
233237
/* One additional value to store the instance as first value */
234238
args = g_new0 (GValue, query.n_params + 1);
235239

0 commit comments

Comments
 (0)