DM: Fix potential buffer overflow and uninitialized variable

- @'rpmb_check_frame()', avoid buffer overflow access
    when calling 'memcmp()'

Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
Yonghua Huang
2018-07-12 18:07:00 +08:00
committed by Jack Ren
parent 194fd8ba1e
commit 83361018b5
2 changed files with 7 additions and 2 deletions

View File

@@ -506,7 +506,7 @@ static bool release_larger_freepage(int level_limit)
*/
static bool hugetlb_reserve_pages(void)
{
int left_gap, pg_size;
int left_gap = 0, pg_size;
int level;
printf("to reserve more free pages:\n");