summaryrefslogtreecommitdiff
path: root/debian/patches/cast-CHAR8-string-handling.patch
blob: e92c8534e04769432376f59f69d66442d7a1f105 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
diff --git a/sbat.c b/sbat.c
index 446bed1a..0946dfbb 100644
--- a/sbat.c
+++ b/sbat.c
@@ -154,7 +154,8 @@ verify_single_entry(struct sbat_entry *entry, struct sbat_var *sbat_var_entry)
 {
 	UINT16 sbat_gen, sbat_var_gen;
 
-	if (strcmp(entry->component_name, sbat_var_entry->component_name) == 0) {
+	if (strcmp((const char *)entry->component_name,
+		   (const char *)sbat_var_entry->component_name) == 0) {
 		dprint(L"component %a has a matching SBAT variable entry, verifying\n",
 			entry->component_name);
 
@@ -162,8 +163,8 @@ verify_single_entry(struct sbat_entry *entry, struct sbat_var *sbat_var_entry)
 		 * atoi returns zero for failed conversion, so essentially
 		 * badly parsed component_generation will be treated as zero
 		 */
-		sbat_gen = atoi(entry->component_generation);
-		sbat_var_gen = atoi(sbat_var_entry->component_generation);
+		sbat_gen = atoi((const char *)entry->component_generation);
+		sbat_var_gen = atoi((const char *)sbat_var_entry->component_generation);
 
 		if (sbat_gen < sbat_var_gen) {
 			dprint(L"component %a, generation %d, was revoked by SBAT variable",