Date: Thu, 25 Oct 2018 14:38:03 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r339718 - stable/8/sys/dev/sound/midi Message-ID: <201810251438.w9PEc3s9047687@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Thu Oct 25 14:38:03 2018 New Revision: 339718 URL: https://svnweb.freebsd.org/changeset/base/339718 Log: MFC r339581: Fix off-by-one which can lead to panics. Found by: Peter Holm <peter@holm.cc> Sponsored by: Mellanox Technologies Modified: stable/8/sys/dev/sound/midi/sequencer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/midi/ (props changed) Modified: stable/8/sys/dev/sound/midi/sequencer.c ============================================================================== --- stable/8/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:37:26 2018 (r339717) +++ stable/8/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:38:03 2018 (r339718) @@ -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];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810251438.w9PEc3s9047687>