a buffer offset equal to the buffer size is illegal too, fix assertion in
sndbuf_getbufofs()
This commit is contained in:
parent
f8db81f347
commit
be27d718c0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=89771
@ -307,7 +307,7 @@ sndbuf_getbuf(struct snd_dbuf *b)
|
||||
void *
|
||||
sndbuf_getbufofs(struct snd_dbuf *b, unsigned int ofs)
|
||||
{
|
||||
KASSERT(ofs <= b->bufsize, ("%s: ofs invalid %d", __func__, ofs));
|
||||
KASSERT(ofs < b->bufsize, ("%s: ofs invalid %d", __func__, ofs));
|
||||
|
||||
return b->buf + ofs;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user