]> git.proxmox.com Git - efi-boot-shim.git/commitdiff
Make another integer compare be signed/unsigned safe as well.
authorPeter Jones <pjones@redhat.com>
Sun, 21 Sep 2014 17:45:38 +0000 (13:45 -0400)
committerPeter Jones <pjones@redhat.com>
Thu, 2 Oct 2014 05:01:54 +0000 (01:01 -0400)
Signed-off-by: Peter Jones <pjones@redhat.com>
MokManager.c

index 4a9b102196ed624f72f5da1a79281fb66f1733a5..ee29051d306332b6a72da3131667f8d091a3ad77 100644 (file)
@@ -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;
                }