mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04: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)
|
||||
return -EINVAL;
|
||||
*p = 0;
|
||||
if (len <= 0)
|
||||
return -EINVAL;
|
||||
cinfo.client = -1;
|
||||
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;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue