Skip to content

spa: audioconvert: fix allocation size calculation

Barnabás Pőcze requested to merge pobrn/pipewire:spa_fix_alloc_size into master
Currently, the code allocates

  sizeof(header) * sizeof(item) * n_items

bytes instead of the more appropriate

  sizeof(header) + sizeof(item) * n_items

Fix that by simply changing the first multiplication to addition, and
furthermore, use a flexible array member instead of a zero-sized array.

Found by clang-tidy.

Merge request reports