mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
seq: Fix invalid sanity-check in snd_seq_set_input_buffer_size()
snd_seq_set_input_buffer_size() has an assert() call with packet_size,
but it's still uninitialized at that point. Fix it with the real
packet size.
Fixes: 2aefb5c41c ("seq: Add UMP support")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
96f60d829f
commit
915a71a2cd
1 changed files with 1 additions and 1 deletions
|
|
@ -1269,9 +1269,9 @@ int snd_seq_set_input_buffer_size(snd_seq_t *seq, size_t size)
|
|||
size_t packet_size;
|
||||
|
||||
assert(seq && seq->ibuf);
|
||||
packet_size = get_packet_size(seq);
|
||||
assert(size >= packet_size);
|
||||
snd_seq_drop_input(seq);
|
||||
packet_size = get_packet_size(seq);
|
||||
size = (size + packet_size - 1) / packet_size;
|
||||
if (size != seq->ibufsize) {
|
||||
char *newbuf;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue