summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorAshish Garg <ashigarg@codeaurora.org>2017-06-09 16:31:41 +0530
committerAshish Garg <ashigarg@codeaurora.org>2017-06-09 16:32:00 +0530
commitfed910ca51f2ec49cdf3ba57c9e649b0d3dc21e5 (patch)
tree5588b877b7d243d38ad6cfff659388b92fc0af9c /tools/perf/scripts/python
parent55a25be010f62b574938ef3da38c50738db78cff (diff)
msm: mdss: validate the buffer size before allocating memory
There is no validation of the "count" parameter, which is controlled by the user and used as a size of allocated memory. If the user provides a value of "0" for "count", then kmalloc would not return NULL, but also there will be a memory block of "zero" size. This can lead to buffer overflows. Also trying to access invalid memory will cause kernel crashes. Ensure to check that the number of bytes to be written is non-zero. If zero, return invalid input. Change-Id: I9613043881a91fd5a5f99337119c4a3d41493b54 Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions