Accepting request 1272042 from Base:System
OBS-URL: https://build.opensuse.org/request/show/1272042 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ledmon?expand=0&rev=30
This commit is contained in:
32
260.patch
Normal file
32
260.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
From 5c5b04e6c2068571c6bd19adfdcda12d618f9edc Mon Sep 17 00:00:00 2001
|
||||
From: Blazej Kucman <blazej.kucman@intel.com>
|
||||
Date: Wed, 16 Apr 2025 12:26:38 +0200
|
||||
Subject: [PATCH] utils: Fix string2ibpi function
|
||||
|
||||
string2ibpi does not compare strings correctly, the function uses strncmp,
|
||||
which in case strings of different lengths, may return incorrect value
|
||||
if substrings of given max length are identical. In this function whole
|
||||
strings must be identical.
|
||||
|
||||
Fix is to change strncmp to strcmp.
|
||||
|
||||
Fixes intel/ledmon#259
|
||||
Fixes: 94818457f615 ("Add struct for mapping ibpi statuses to strings. (#211)")
|
||||
Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
|
||||
---
|
||||
src/lib/utils.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lib/utils.c b/src/lib/utils.c
|
||||
index bad35eb4..2fe0f764 100644
|
||||
--- a/src/lib/utils.c
|
||||
+++ b/src/lib/utils.c
|
||||
@@ -765,7 +765,7 @@ enum led_ibpi_pattern string2ibpi(const char *name)
|
||||
if (!input_name)
|
||||
continue;
|
||||
|
||||
- if (strncmp(input_name, name, strlen(input_name)) == 0)
|
||||
+ if (strcmp(input_name, name) == 0)
|
||||
return ipbi_names[i].ibpi;
|
||||
}
|
||||
|
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 23 02:47:04 UTC 2025 - Nicholas Yang <nicholas.yang@suse.com>
|
||||
|
||||
- Add a patch to fix string2ibpi function (bsc#1241207):
|
||||
* 260.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 11 03:33:30 UTC 2024 - Nicholas Yang <nicholas.yang@suse.com>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package ledmon
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -25,6 +25,7 @@ Group: Hardware/Other
|
||||
URL: https://github.com/intel/ledmon/
|
||||
Source0: https://github.com/intel/ledmon/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Patch0: harden_ledmon.service.patch
|
||||
Patch1: 260.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: autoconf-archive
|
||||
BuildRequires: automake
|
||||
|
Reference in New Issue
Block a user