!20 Fixed settings_len variable type conversion issue
From: @liyy9 Reviewed-by: @zhujianwei001 Signed-off-by: @zhujianwei001
This commit is contained in:
commit
68f6627530
26
0002-Fixed-settings_len-variable-type-conversion-issue.patch
Normal file
26
0002-Fixed-settings_len-variable-type-conversion-issue.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From 21dec7383d2f328af3d3aa401e3c90123dfcf9b7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: liyuanyuan <liyuanyuan.xfusion.com>
|
||||||
|
Date: Fri, 29 Dec 2023 16:56:16 +0800
|
||||||
|
Subject: [PATCH] Fixed settings_len variable type conversion issue
|
||||||
|
|
||||||
|
---
|
||||||
|
src/mokutil.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/mokutil.c b/src/mokutil.c
|
||||||
|
index 87f0793..88d61c8 100644
|
||||||
|
--- a/src/mokutil.c
|
||||||
|
+++ b/src/mokutil.c
|
||||||
|
@@ -787,7 +787,8 @@ generate_hash (pw_crypt_t *pw_crypt, char *password, unsigned int pw_len)
|
||||||
|
char *next;
|
||||||
|
char *crypt_string;
|
||||||
|
const char *prefix;
|
||||||
|
- int hash_len, settings_len = sizeof (settings) - 2;
|
||||||
|
+ int hash_len = sizeof (settings) - 2;
|
||||||
|
+ size_t settings_len = sizeof (settings) - 2;
|
||||||
|
|
||||||
|
if (!password || !pw_crypt || password[pw_len] != '\0')
|
||||||
|
return -1;
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: mokutil
|
Name: mokutil
|
||||||
Version: 0.4.0
|
Version: 0.4.0
|
||||||
Release: 2
|
Release: 3
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: Tools for manipulating machine owner keys
|
Summary: Tools for manipulating machine owner keys
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
@ -8,6 +8,7 @@ URL: https://github.com/lcp/mokutil
|
|||||||
Source0: https://github.com/lcp/mokutil/archive/%{version}.tar.gz
|
Source0: https://github.com/lcp/mokutil/archive/%{version}.tar.gz
|
||||||
|
|
||||||
Patch0001: 0001-Fix-32-bit-build.patch
|
Patch0001: 0001-Fix-32-bit-build.patch
|
||||||
|
Patch0002: 0002-Fixed-settings_len-variable-type-conversion-issue.patch
|
||||||
|
|
||||||
BuildRequires:gcc autoconf automake gnu-efi git openssl-devel openssl efivar-devel >= 31-1 git
|
BuildRequires:gcc autoconf automake gnu-efi git openssl-devel openssl efivar-devel >= 31-1 git
|
||||||
Conflicts: shim < 0.8-1
|
Conflicts: shim < 0.8-1
|
||||||
@ -59,6 +60,9 @@ make check
|
|||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Dec 29 2023 liyuanyuan <liyuanyuan@xfusion.com> - 1:0.4.0-3
|
||||||
|
- Fixed settings_len variable type conversion issue
|
||||||
|
|
||||||
* Fri Dec 29 2023 liyuanyuan <liyuanyuan@xfusion.com> - 1:0.4.0-2
|
* Fri Dec 29 2023 liyuanyuan <liyuanyuan@xfusion.com> - 1:0.4.0-2
|
||||||
- Fix 32 bit build
|
- Fix 32 bit build
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user