The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=4eac02b29f56f35d17f3cb2104e5b952841e83b9
commit 4eac02b29f56f35d17f3cb2104e5b952841e83b9 Author: Christos Margiolis <[email protected]> AuthorDate: 2025-10-27 11:30:29 +0000 Commit: Christos Margiolis <[email protected]> CommitDate: 2025-10-31 09:24:24 +0000 snd_dummy: Round channel pointer after each write Otherwise we go out of bounds and keep incrementing endlessly. Sponsored by: The FreeBSD Foundation MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D53337 (cherry picked from commit 364864ea91abbd8a9a79578168fa5d34e05200a7) --- sys/dev/sound/dummy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/dummy.c b/sys/dev/sound/dummy.c index 1f2d69708eec..39214a141bf9 100644 --- a/sys/dev/sound/dummy.c +++ b/sys/dev/sound/dummy.c @@ -104,9 +104,10 @@ dummy_chan_io(void *arg) ch = &sc->chans[i]; if (!ch->run) continue; - if (ch->dir == PCMDIR_PLAY) + if (ch->dir == PCMDIR_PLAY) { ch->ptr += sndbuf_getblksz(ch->buf); - else + ch->ptr %= sndbuf_getsize(ch->buf); + } else sndbuf_fillsilence(ch->buf); snd_mtxunlock(sc->lock); chn_intr(ch->chan);
