[2/2] examples/pipeline: fix incorrect array out of bounds check
Checks
Commit Message
Fix the incorrect array out of bounds check within the function
pipeline_selector_group_member_read().
Coverity issue: 371911
Fixes: 598fe0dd0d8e3 ("examples/pipeline: support selector table")
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
examples/pipeline/cli.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
12/07/2021 20:18, Cristian Dumitrescu:
> Fix the incorrect array out of bounds check within the function
> pipeline_selector_group_member_read().
>
> Coverity issue: 371911
> Fixes: 598fe0dd0d8e3 ("examples/pipeline: support selector table")
>
> Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Pathset applied, thanks.
@@ -1511,7 +1511,7 @@ pipeline_selector_group_member_read(const char *string,
if (!token || token_is_comment(token))
break;
- if (n_tokens > GROUP_MEMBER_INFO_TOKENS_MAX)
+ if (n_tokens >= GROUP_MEMBER_INFO_TOKENS_MAX)
goto error;
token_array[n_tokens] = token;