summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangchul Lee <sangchul1011@gmail.com>2018-05-04 02:00:26 +0900
committerTanu Kaskinen <tanuk@iki.fi>2018-05-04 17:30:59 +0300
commit66e8ec345336e2b0bd5aa0f4810319b03728ff96 (patch)
tree5bb18ab89656e3ee4f70248b0e39abee3b723c0a
parentae843808bcedbfb2503fd1afbfe6c99af2596627 (diff)
downloadpulseaudio-66e8ec345336e2b0bd5aa0f4810319b03728ff96.tar.gz
ladspa-sink: fix incorrect error conditions
fix codes to prevent null pointer dereference of cdata variable. Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
-rw-r--r--src/modules/module-ladspa-sink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c
index d677381d8..c365b3104 100644
--- a/src/modules/module-ladspa-sink.c
+++ b/src/modules/module-ladspa-sink.c
@@ -718,7 +718,7 @@ static int parse_control_parameters(struct userdata *u, const char *cdata, doubl
pa_log_debug("Trying to read %lu control values", u->n_control);
- if (!cdata && u->n_control > 0)
+ if (!cdata || u->n_control == 0)
return -1;
pa_log_debug("cdata: '%s'", cdata);