diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2013-05-05 09:50:22 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2013-05-05 09:50:22 +0000 |
commit | be621b52db356eeb6476cba4f4e9684f1be462db (patch) | |
tree | f8d7decffaf5e2b901693a851addac3132924514 /usr.bin/sndiod | |
parent | 2e02b7bd5267f3ba8c61e07a287499d1be13fcb3 (diff) |
Initialize client rate. Fixes crashes when the client doesn't set the
rate. Problem reported and analyzed by Dimitri Sokolyuk <sokolyuk at
gmail.com>. Thanks!
Diffstat (limited to 'usr.bin/sndiod')
-rw-r--r-- | usr.bin/sndiod/dev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/sndiod/dev.c b/usr.bin/sndiod/dev.c index c7243b5093e..9107a91b04e 100644 --- a/usr.bin/sndiod/dev.c +++ b/usr.bin/sndiod/dev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev.c,v 1.4 2013/02/26 22:52:08 ratchov Exp $ */ +/* $OpenBSD: dev.c,v 1.5 2013/05/05 09:50:21 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org> * @@ -1573,6 +1573,7 @@ found: s->dup = 0; s->appbufsz = d->bufsz; s->round = d->round; + s->rate = d->rate; dev_midi_slotdesc(d, s); dev_midi_vol(d, s); return s; |