platform: msm_shared: add buffer overread check

read_der_message_length assumes the size of input buffer itself
but this function is called by multiple functions that might have
different buffer size, so length of buffer is passed as a parameter
and added in the check.

Change-Id: I789a39fa670a3c191e6ea8e01bacc1221b472bf0
3 files changed