From 440bd793f3affff74256cc41fb54c06a45683858 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Tue, 11 Nov 2025 21:57:43 +0000 Subject: [PATCH] import UBI sysfsutils-2.1.1-15.el10 --- sysfsutils-2.1.1-fix-my-strncat.patch | 21 +++++++++++++++++++++ sysfsutils.spec | 7 ++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 sysfsutils-2.1.1-fix-my-strncat.patch diff --git a/sysfsutils-2.1.1-fix-my-strncat.patch b/sysfsutils-2.1.1-fix-my-strncat.patch new file mode 100644 index 0000000..c5de087 --- /dev/null +++ b/sysfsutils-2.1.1-fix-my-strncat.patch @@ -0,0 +1,21 @@ +diff -up sysfsutils-2.1.1/lib/sysfs_utils.c.orig sysfsutils-2.1.1/lib/sysfs_utils.c +--- sysfsutils-2.1.1/lib/sysfs_utils.c.orig 2025-03-11 15:06:31.976403632 +0100 ++++ sysfsutils-2.1.1/lib/sysfs_utils.c 2025-03-13 08:40:42.648753678 +0100 +@@ -369,14 +369,14 @@ char *my_strncpy(char *to, const char *f + } + + /** +- * my_strncpy -- a safe strncpy ++ * my_strncat -- a safe strncat + */ + char *my_strncat(char *to, const char *from, size_t max) + { + size_t i = 0; + +- while (i < max && to[i] != '\0') ++ while (to[i] != '\0') + i++; +- my_strncpy(to+i, from, max-i); ++ my_strncpy(to+i, from, max); + return to; + } diff --git a/sysfsutils.spec b/sysfsutils.spec index 1ac270c..d65ee3e 100644 --- a/sysfsutils.spec +++ b/sysfsutils.spec @@ -4,13 +4,14 @@ Name: sysfsutils Version: 2.1.1 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Utilities for interfacing with sysfs URL: https://github.com/linux-ras/sysfsutils License: GPL-2.0-only Source0: https://github.com/linux-ras/sysfsutils/archive/v%{version}.tar.gz Patch0: sysfsutils-2.1.1-fix-memleaks-of-by-one-error.patch +Patch1: sysfsutils-2.1.1-fix-my-strncat.patch BuildRequires: autoconf BuildRequires: automake @@ -73,6 +74,10 @@ find %{buildroot} -type f -name "*.la" -delete %changelog +* Tue Apr 22 2025 Vitezslav Crhonek - 2.1.1-15 +- Fix erroneous my_strncat implementation + Resolves: RHEL-83778 + * Tue Oct 29 2024 Troy Dawson - 2.1.1-14 - Bump release for October 2024 mass rebuild: Resolves: RHEL-64018