From e62b75c36b27d90dcf627a6bbbb419699e1de4f0 Mon Sep 17 00:00:00 2001 From: xuchenchen Date: Tue, 18 Nov 2025 19:20:19 +0800 Subject: [PATCH] xfs_db: Fix uninicialized error variable --- 0015-fix-uninicialized-error-variable.patch | 34 +++++++++++++++++++++ xfsprogs.spec | 6 +++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 0015-fix-uninicialized-error-variable.patch diff --git a/0015-fix-uninicialized-error-variable.patch b/0015-fix-uninicialized-error-variable.patch new file mode 100644 index 0000000..1afba8d --- /dev/null +++ b/0015-fix-uninicialized-error-variable.patch @@ -0,0 +1,34 @@ +From a3e126d559a17f522e892079f142f9a74a077deb Mon Sep 17 00:00:00 2001 +From: Pavel Reichl +Date: Fri, 31 May 2024 00:38:18 +0200 +Subject: xfs_db: Fix uninicialized error variable + +To silence redhat's covscan checker: + +Error: UNINIT (CWE-457): [#def1] [important] +xfsprogs-6.4.0/db/hash.c:308:2: var_decl: Declaring variable "error" without initializer. +xfsprogs-6.4.0/db/hash.c:353:2: uninit_use: Using uninitialized value "error". + +Signed-off-by: Pavel Reichl +Reviewed-by: Darrick J. Wong +Reviewed-by: Christoph Hellwig +--- + db/hash.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/db/hash.c b/db/hash.c +index 05a94f249c..9b3fdea6c4 100644 +--- a/db/hash.c ++++ b/db/hash.c +@@ -304,7 +304,7 @@ collide_xattrs( + struct dup_table *tab = NULL; + xfs_dahash_t old_hash; + unsigned long i; +- int error; ++ int error = 0; + + old_hash = libxfs_da_hashname((uint8_t *)name, namelen); + +-- +cgit 1.2.3-korg + diff --git a/xfsprogs.spec b/xfsprogs.spec index 396df38..274b761 100644 --- a/xfsprogs.spec +++ b/xfsprogs.spec @@ -1,6 +1,6 @@ Name: xfsprogs Version: 6.6.0 -Release: 15 +Release: 16 Summary: Administration and debugging tools for the XFS file system License: GPL-1.0-or-later AND LGPL-2.1-or-later URL: https://xfs.wiki.kernel.org @@ -33,6 +33,7 @@ Patch11: 0011-mkfs-fix-the-issue-of-maxpct-set-to-0-not-taking-eff.patch Patch12: 0012-xfs_repair-don-t-leak-the-rootdir-inode-when-orphana.patch Patch13: 0013-xfs_repair-fix-stupid-argument-error-in-verify_inode.patch Patch14: 0014-clean-up-lock-resources.patch +Patch15: 0015-fix-uninicialized-error-variable.patch %description xfsprogs are the userspace utilities that manage XFS filesystems. @@ -105,6 +106,9 @@ rm -rf %{buildroot}%{_datadir}/doc/xfsprogs/ %exclude %{_mandir}/man8/xfs_scrub* %changelog +* Tue Nov 18 2025 xuchenchen - 6.6.0-16 +- xfs_db: Fix uninicialized error variable + * Tue Nov 18 2025 xuchenchen - 6.6.0-15 - xfs_repair: clean up lock resources -- Gitee