On Thu, 2014-10-16 at 11:41 +0200, David Henningsson wrote: > 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 ). > > Signed-off-by: David Henningsson <david.henningsson at canonical.com> > --- > src/pulsecore/memblockq.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/pulsecore/memblockq.c b/src/pulsecore/memblockq.c > index 571107d..09e8ee3 100644 > --- a/src/pulsecore/memblockq.c > +++ b/src/pulsecore/memblockq.c > @@ -288,6 +288,7 @@ int pa_memblockq_push(pa_memblockq* bq, const pa_memchunk *uchunk) { > pa_assert(uchunk->index + uchunk->length <= pa_memblock_get_length(uchunk->memblock)); > > pa_assert_se(uchunk->length % bq->base == 0); > + pa_assert_se(uchunk->index % bq->base == 0); Probably don't want _se here (and want to drop the previous assert's _se as well, as you mentioned on the bug). -- Arun