From: Takashi Iwai Date: Wed, 19 Sep 2001 20:10:32 +0000 (+0000) Subject: fixed possible segfault in snd_seq_parse_address X-Git-Tag: v1.0.3~671 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=10fa12eb7d7a2a9e9680c038e48da05c5de89ec7;p=alsa-lib.git fixed possible segfault in snd_seq_parse_address --- diff --git a/src/seq/seqmid.c b/src/seq/seqmid.c index 6b832ccb..bc46fa10 100644 --- a/src/seq/seqmid.c +++ b/src/seq/seqmid.c @@ -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; }