Author: hselasky Date: Thu Oct 25 14:36:56 2018 New Revision: 339716 URL: https://svnweb.freebsd.org/changeset/base/339716
Log: MFC r339581: Fix off-by-one which can lead to panics. Found by: Peter Holm <pe...@holm.cc> Sponsored by: Mellanox Technologies Modified: stable/9/sys/dev/sound/midi/sequencer.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/sound/midi/sequencer.c ============================================================================== --- stable/9/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:35:52 2018 (r339715) +++ stable/9/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:36:56 2018 (r339716) @@ -737,7 +737,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]; _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"