Commit 5a52a5f5 authored by Karthikeyan Ramasubramanian's avatar Karthikeyan Ramasubramanian Committed by Gerrit - the friendly Code Review server
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 01f1a7a6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment