diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2007-08-10 09:41:07 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 15:58:38 +0200 |
commit | 0e75182cf34ab7f7f1d88c1231fcc04780a7dc7d (patch) | |
tree | 6d5d27292e10d202ca3ba69e8a4d1ae70a2dd723 /sound/core | |
parent | bf8c1382c0339e95e89394f59a149610dd2d828f (diff) | |
download | kernel_samsung_crespo-0e75182cf34ab7f7f1d88c1231fcc04780a7dc7d.zip kernel_samsung_crespo-0e75182cf34ab7f7f1d88c1231fcc04780a7dc7d.tar.gz kernel_samsung_crespo-0e75182cf34ab7f7f1d88c1231fcc04780a7dc7d.tar.bz2 |
[ALSA] seq_midi_event: fix parsing of F9/FD bytes
Check for a valid event type when encoding a system real-time message to
prevent the bytes F9 or FD resulting in an empty sequencer message.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/seq/seq_midi_event.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/seq/seq_midi_event.c b/sound/core/seq/seq_midi_event.c index a15f5e6..4641677 100644 --- a/sound/core/seq/seq_midi_event.c +++ b/sound/core/seq/seq_midi_event.c @@ -252,7 +252,7 @@ int snd_midi_event_encode_byte(struct snd_midi_event *dev, int c, ev->type = status_event[ST_SPECIAL + c - 0xf0].event; ev->flags &= ~SNDRV_SEQ_EVENT_LENGTH_MASK; ev->flags |= SNDRV_SEQ_EVENT_LENGTH_FIXED; - return 1; + return ev->type != SNDRV_SEQ_EVENT_NONE; } spin_lock_irqsave(&dev->lock, flags); |