mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
memblockq: Do not allow non-frame indices in the memblock queue
Since we don't allow lengths that are not frame aligned, it does not make sense to allow indices that are not frame aligned either. Also, allowing such a thing to be added causes the daemon to crash later instead (see https://bugs.freedesktop.org/show_bug.cgi?id=77595 ). Also drop _se from assert (there is no side effect). Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
4971dc9ed6
commit
6434853b04
1 changed files with 2 additions and 1 deletions
|
|
@ -287,7 +287,8 @@ int pa_memblockq_push(pa_memblockq* bq, const pa_memchunk *uchunk) {
|
|||
pa_assert(uchunk->length > 0);
|
||||
pa_assert(uchunk->index + uchunk->length <= pa_memblock_get_length(uchunk->memblock));
|
||||
|
||||
pa_assert_se(uchunk->length % bq->base == 0);
|
||||
pa_assert(uchunk->length % bq->base == 0);
|
||||
pa_assert(uchunk->index % bq->base == 0);
|
||||
|
||||
if (!can_push(bq, uchunk->length))
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue