!38 Fix format specifier for pointer subtraction

From: @jia-wenhao1017 
Reviewed-by: @mailofzxf 
Signed-off-by: @mailofzxf
This commit is contained in:
openeuler-ci-bot 2025-04-18 02:51:22 +00:00 committed by Gitee
commit ad99c94282
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From 8de171d78e8ed4ec757e984a3832566c840c1928 Mon Sep 17 00:00:00 2001
From: jiawenhao <jiawenhao@xfusion.com>
Date: Thu, 17 Apr 2025 18:04:29 +0800
Subject: [PATCH] fix-format-specifier-for-pointer-subtraction
---
keyctl_watch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyctl_watch.c b/keyctl_watch.c
index a70a19a..1436c08 100644
--- a/keyctl_watch.c
+++ b/keyctl_watch.c
@@ -179,7 +179,7 @@ int consumer(FILE *log, FILE *gc, int fd)
memcpy(&n, p, largest);
if (debug)
- fprintf(stderr, "NOTIFY[%03zx]: ty=%06x sy=%02x i=%08x\n",
+ fprintf(stderr, "NOTIFY[%03tx]: ty=%06x sy=%02x i=%08x\n",
p - buffer, n.n.type, n.n.subtype, n.n.info);
len = n.n.info & WATCH_INFO_LENGTH;
--
2.27.0

View File

@ -1,6 +1,6 @@
Name: keyutils
Version: 1.6.3
Release: 6
Release: 7
Summary: Utilities of Linux Key Management
License: GPLv2+ and LGPLv2+
@ -9,6 +9,7 @@ Source0: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/s
Patch9000: bugfix-fix-argv-string-out-of-bounds.patch
Patch9001: backport-fix-a-formatting-on-the-keyctl.1-man-page.patch
Patch9002: backport-fix-format-specifier-for-pointer-subtraction.patch
BuildRequires: gcc gcc-c++
BuildRequires: glibc-kernheaders >= 2.4-9.1.92
@ -97,6 +98,9 @@ make \
%{_mandir}/man*/*
%changelog
* Fri Apr 18 2025 jiawenhao <jiawenhao@xfusion.com> - 1.6.3-7
- DESC: Fix format specifier for pointer subtraction
* Thu Apr 17 2025 jiawenhao <jiawenhao@xfusion.com> - 1.6.3-6
- DESC: fix a formatting on the keyctl.1 man page