]> git.alsa-project.org Git - alsa-lib.git/commit
topology: fix uint32_t overflow in control decoder size checks
authorHarsh Raj Singhania <raj.harshraut@gmail.com>
Wed, 30 Sep 2026 18:58:15 +0000 (00:28 +0530)
committerTakashi Iwai <tiwai@suse.de>
Thu, 15 Oct 2026 13:30:00 +0000 (15:30 +0200)
commitf8253a68baf9a5f57cdff1cd178920d13e5beb2b
tree1f25b59e2636d777b5fdce505aa9cfb489e4a7a1
parentf5377bbb572d88d9a59eee8ae26bff30d5a2ebb3
topology: fix uint32_t overflow in control decoder size checks

size2 = x->size + x->priv.size was computed in 32-bit arithmetic and could
wrap on a 64-bit host, bypassing the subsequent bounds check. Pre-check
for overflow then cast to size_t. Affects tplg_decode_control_mixer,
tplg_decode_control_enum, and tplg_decode_control_bytes.

Closes: https://github.com/alsa-project/alsa-lib/pull/527
Signed-off-by: Harsh Raj Singhania <raj.harshraut@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/topology/ctl.c