Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
audio: kpb: fix potential NULL pointer dereference in device list reset
This patch addresses a potential NULL pointer dereference issue in the `devicelist_reset` function within the Key Phrase Buffer (KPB) component. The issue was exposed by a recent change in Zephyr's MMU mapping for Intel ADSP ACE30, which now catches NULL pointer accesses. The `devicelist_reset` function previously iterated over the entire `DEVICE_LIST_SIZE` when clearing items and zeroing pointers, which could lead to dereferencing NULL pointers. The fix involves iterating only up to `devlist->count` to ensure that only valid pointers are accessed. This change prevents potential NULL pointer dereference and ensures the stability of the KPB component. Link: thesofproject#9687 Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
- Loading branch information