Skip to content

Commit

Permalink
Make another integer compare be signed/unsigned safe as well.
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Jones <pjones@redhat.com>
  • Loading branch information
vathpela committed Oct 2, 2014
1 parent 034466b commit c622b67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MokManager.c
Expand Up @@ -192,7 +192,8 @@ static MokListNode *build_mok_list(UINT32 num, void *Data, UINTN DataSize) {
list[count].Type = CertList->SignatureType;

/* MOK out of bounds? */
if (list[count].MokSize > end - (void *)list[count].Mok) {
if (list[count].MokSize > (unsigned long)end -
(unsigned long)list[count].Mok) {
FreePool(list);
return NULL;
}
Expand Down

0 comments on commit c622b67

Please sign in to comment.