From 7e6c9d26e3b5a8f295dec7f0551b0d9ce227a863 Mon Sep 17 00:00:00 2001 From: Tomasz Leman Date: Wed, 7 Oct 2026 13:50:08 +0200 Subject: [PATCH] audio: component: don't use uninitialized base config comp_update_ibs_obs_cpc() logged the comp_get_attribute() failure and set neutral values, but then fell through and immediately overwrote them from the uninitialized dev_cfg stack structure, publishing garbage ll_chunk_size, obs, ibs and cpc values to the component. Return right after setting the neutral values so dev_cfg is only read when comp_get_attribute() succeeded. Found by clang-analyzer-core.uninitialized.Assign. Assisted-by: Copilot:claude-opus-5 clang-tidy Signed-off-by: Tomasz Leman --- src/audio/component.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/audio/component.c b/src/audio/component.c index 62f116884f96..c7c5176b1645 100644 --- a/src/audio/component.c +++ b/src/audio/component.c @@ -691,6 +691,7 @@ void comp_update_ibs_obs_cpc(struct comp_dev *dev) dev->cpc = 0; dev->obs = 0; dev->ibs = 0; + return; } dev->ll_chunk_size = get_one_ms_in_bytes(dev_cfg.audio_fmt); dev->obs = dev_cfg.obs;