mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
ucm: fix possible NULL pointer dereference in uc_mgr_exec()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
7fcb1aadd5
commit
26ab7fc3e4
1 changed files with 5 additions and 1 deletions
|
|
@ -185,7 +185,11 @@ int uc_mgr_exec(const char *prog)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
prog = argv[0];
|
prog = argv[0];
|
||||||
if (argv[0][0] != '/' && argv[0][0] != '.') {
|
if (prog == NULL) {
|
||||||
|
err = -EINVAL;
|
||||||
|
goto __error;
|
||||||
|
}
|
||||||
|
if (prog[0] != '/' && prog[0] != '.') {
|
||||||
if (!find_exec(argv[0], bin, sizeof(bin))) {
|
if (!find_exec(argv[0], bin, sizeof(bin))) {
|
||||||
err = -ENOEXEC;
|
err = -ENOEXEC;
|
||||||
goto __error;
|
goto __error;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue