Blob Blame History Raw
From cadc90a7efc977a8bfb835a5ade5333e0800648a Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 29 Apr 2014 11:31:15 -0400
Subject: [PATCH 05/22] Remove bogus test for optional data length bounds.

We're getting the size from subtracting from the actual limit; it can't
be over the limit, and it's not related to the variable we're comparing
it to anyway.

Not sure how I came up with that logic, but it sure is wrong.

Signed-off-by: Peter Jones <pjones@redhat.com>
---
 src/efibootmgr/efibootmgr.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/efibootmgr/efibootmgr.c b/src/efibootmgr/efibootmgr.c
index 1bc48b2..e2ec5cd 100644
--- a/src/efibootmgr/efibootmgr.c
+++ b/src/efibootmgr/efibootmgr.c
@@ -693,10 +693,6 @@ show_boot_vars()
 				printf("\n");
 				continue;
 			}
-			if (optional_data_len > (uint64_t)(path->length + 4)) {
-				printf("(invalid optional data length)\n");
-				continue;
-			}
 
 			rc = unparse_raw_text(text_path, text_path_len,
 				((uint8_t *)path)
-- 
1.9.3