svn commit: r339708 - stable/12/sys/dev/sound/midi
Hans Petter Selasky
hselasky at FreeBSD.org
Thu Oct 25 12:27:18 UTC 2018
Author: hselasky
Date: Thu Oct 25 12:27:16 2018
New Revision: 339708
URL: https://svnweb.freebsd.org/changeset/base/339708
Log:
MFC r339581:
Fix off-by-one which can lead to panics.
Found by: Peter Holm <peter at holm.cc>
Approved by: re (kib)
Sponsored by: Mellanox Technologies
Modified:
stable/12/sys/dev/sound/midi/sequencer.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/dev/sound/midi/sequencer.c
==============================================================================
--- stable/12/sys/dev/sound/midi/sequencer.c Thu Oct 25 12:13:13 2018 (r339707)
+++ stable/12/sys/dev/sound/midi/sequencer.c Thu Oct 25 12:27:16 2018 (r339708)
@@ -730,7 +730,7 @@ static int
seq_fetch_mid(struct seq_softc *scp, int unit, kobj_t *md)
{
- if (unit > scp->midi_number || unit < 0)
+ if (unit >= scp->midi_number || unit < 0)
return EINVAL;
*md = scp->midis[unit];
More information about the svn-src-stable
mailing list