projects
/
platform
/
core
/
uifw
/
libtdm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28a7370
)
client: check invalid params
55/171055/2
author
Boram Park
<boram1288.park@samsung.com>
Mon, 26 Feb 2018 02:15:38 +0000
(11:15 +0900)
committer
Boram Park
<boram1288.park@samsung.com>
Mon, 26 Feb 2018 23:50:59 +0000
(08:50 +0900)
Change-Id: I637a30bb799589d359c8e9bfdafdec539a062717
client/tdm_client.c
patch
|
blob
|
history
diff --git
a/client/tdm_client.c
b/client/tdm_client.c
index
468d984
..
a665eb1
100644
(file)
--- a/
client/tdm_client.c
+++ b/
client/tdm_client.c
@@
-659,8
+659,14
@@
tdm_client_get_output(tdm_client *client, char *name, tdm_error *error)
return NULL;
}
- if (!name)
+ if (!name)
{
name = "primary";
+ } else if (strncmp(name, "primary", 7) && strncmp(name, "default", 7)) {
+ if (error)
+ *error = TDM_ERROR_INVALID_PARAMETER;
+ pthread_mutex_unlock(&private_client->lock);
+ return NULL;
+ }
LIST_FOR_EACH_ENTRY(private_output, &private_client->output_list, link) {
if (!strncmp(private_output->name, name, TDM_NAME_LEN)) {