commit | 1921eba1b4cd3148bfc4c55cc72fc58db8aa8379 | [log] [tgz] |
---|---|---|
author | Channagoud Kadabi <ckadabi@codeaurora.org> | Thu Mar 12 15:14:22 2015 -0700 |
committer | Gerrit - the friendly Code Review server <code-review@localhost> | Sat Mar 14 08:24:21 2015 -0700 |
tree | 4510ae2e2ca83264de7a6ca3b54c839cf090d8c3 | |
parent | 63ebd97de5b5ad2c5af9cc23320b32909ea3a36e [diff] |
platform: msm_shared: Fix buffer over read Fix buffer read while reading mbr partition type in the partition parser. Change-Id: Iaeaf80fcd7c5fec464db37ca200e612f46e7e12c
diff --git a/platform/msm_shared/partition_parser.c b/platform/msm_shared/partition_parser.c index 6facb93..a702b45 100644 --- a/platform/msm_shared/partition_parser.c +++ b/platform/msm_shared/partition_parser.c
@@ -930,7 +930,7 @@ { unsigned int type_offset = TABLE_ENTRY_0 + OFFSET_TYPE; - if (size < type_offset) { + if (size < (type_offset + sizeof (*partition_type))) { goto end; }