angler-fishThe Vulnerability History Project

iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmBIwL0ACgkQJNaLcl1U

      h9DjsAf/VKDgyUYgHOWoi1MIx3D9jSfaupEL7OoKJA8Oua41IQ6pKDl6+gyHsZsm
 2udJg6eTr6oUU1OkLEnOy8ATeVzUBPEndQXMfwKHLr3lHDMq87YIYn6w/px31zrE
 +JgzdDu5zCLTwEC9ULfImls9kAffmyQRb0puyVi5lLK8+YqFtTyp4ZW3psRTjsZj
 I9T8k+B0IBsGNLoKeEXRFiKn5qG5E4TbaVRD2LulnCvBmKBdQAOtMi1KSOMWwCl0
 QiUfBOijDLDZrFIptVdH2wzdwlyk4yFksLkZwf/WCm+Onmxb9IvMq1NR6U3R+QAN
 6srZ++OqnWnK4kFyIYIzYXFqaNgGGw==
 =itd4
 -----END PGP SIGNATURE-----

ASoC: qcom: sdm845: Fix array out of bounds access

Static analysis Coverity had detected a potential array out-of-bounds
write issue due to the fact that MAX AFE port Id was set to 16 instead
of using AFE_PORT_MAX macro.

Fix this by properly using AFE_PORT_MAX macro.

Fixes: 1b93a8843147 ("ASoC: qcom: sdm845: handle soundwire stream")
Reported-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210309142129.14182-2-srinivas.kandagatla@li
    
commit 1c668e1c0a0f74472469cd514f40c9012b324c31
+2 -2
expand_less