Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4a7e14f0 authored by Karthikeyan Ramasubramanian's avatar Karthikeyan Ramasubramanian
Browse files

lib: qmi: Fix decoding logic for nested structures



While decoding a subset of QMI message that maps to an array of nested
structures, the decodable length is equally split across each structure
instance in that array. This is not correct when the nested structure holds
a variable length element.

1) Use the entire decodable length for each structure instance.
2) Update the decodable length after decoding for each structure instance.
3) Check the decoded length does not overrun the decodable length after
   decoding for each structure instance.

Change-Id: I58aad07010fe6961379f3f04a3cebf3f1c4a1bf8
Signed-off-by: default avatarKarthikeyan Ramasubramanian <kramasub@codeaurora.org>
parent 62e43848
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment