mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-16 08:56:42 -05:00
fixed possible segfault in snd_seq_parse_address
This commit is contained in:
parent
2c6ae59504
commit
10fa12eb7d
1 changed files with 1 additions and 2 deletions
|
|
@ -383,12 +383,11 @@ int snd_seq_parse_address(snd_seq_t *seq, snd_seq_addr_t *addr, const char *arg)
|
||||||
|
|
||||||
if (! seq)
|
if (! seq)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
*p = 0;
|
|
||||||
if (len <= 0)
|
if (len <= 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
cinfo.client = -1;
|
cinfo.client = -1;
|
||||||
while (snd_seq_query_next_client(seq, &cinfo) >= 0) {
|
while (snd_seq_query_next_client(seq, &cinfo) >= 0) {
|
||||||
if (! strncmp(cinfo.name, arg, len)) {
|
if (! strncmp(arg, cinfo.name, len)) {
|
||||||
addr->client = cinfo.client;
|
addr->client = cinfo.client;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue