msm: pil: Replace incorrect offset check

This check is practically useless as it doesn't ensure anything
besides that the program headers start within the file size. It's
still possible for the program headers to extend beyond the size
of the data passed in. Fix this check by actually ensuring the
size of the buffer is enough to contain at least the program
headers so we don't access unmapped memory.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
1 file changed