]> git.alsa-project.org Git - alsa-utils.git/commit
topology: fix potential null pointer from strchr
authorChao Song <chao.song@linux.intel.com>
Mon, 31 May 2021 02:29:57 +0000 (10:29 +0800)
committerJaroslav Kysela <perex@perex.cz>
Wed, 2 Jun 2021 14:55:57 +0000 (16:55 +0200)
commit3d7a6facd9e1f962eef6c4ba3aa4cdc22477a6ac
tree36bc9633adc3e1228001801cf971398e6fd3ee58
parent78212445de4c8e07873cbc7dff2abcacd031f151
topology: fix potential null pointer from strchr

This patch adds check to the return pointer from strchr,
because it may be null and cause segment fault, if component
is not properly constructed.

Fixes: https://github.com/alsa-project/alsa-utils/pull/91
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
topology/pre-process-dapm.c
topology/pre-process-object.c