mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
control: warn when we overflow the control buffer
This commit is contained in:
parent
d7df3811e1
commit
e897a8afc4
2 changed files with 12 additions and 0 deletions
|
|
@ -571,6 +571,12 @@ static int process_read(struct seq_state *state)
|
|||
port->buffer->buf->datas[0].chunk->offset = 0;
|
||||
port->buffer->buf->datas[0].chunk->size = port->builder.state.offset;
|
||||
|
||||
if (port->builder.state.offset > port->buffer->buf->datas[0].maxsize) {
|
||||
spa_log_warn(state->log, "control overflow: %d > %d",
|
||||
port->builder.state.offset,
|
||||
port->buffer->buf->datas[0].maxsize);
|
||||
}
|
||||
|
||||
/* move buffer to ready queue */
|
||||
spa_list_remove(&port->buffer->link);
|
||||
SPA_FLAG_SET(port->buffer->flags, BUFFER_FLAG_OUT);
|
||||
|
|
|
|||
|
|
@ -784,6 +784,12 @@ static int impl_node_process(void *object)
|
|||
}
|
||||
spa_pod_builder_pop(&builder, &f);
|
||||
|
||||
if (builder.state.offset > d->maxsize) {
|
||||
spa_log_warn(this->log, "%p: control overflow %d > %d",
|
||||
this, builder.state.offset, d->maxsize);
|
||||
builder.state.offset = 0;
|
||||
}
|
||||
|
||||
d->chunk->offset = 0;
|
||||
d->chunk->size = builder.state.offset;
|
||||
d->chunk->stride = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue