[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <174297431194.14745.4198914327730875327.tip-bot2@tip-bot2>
Date: Wed, 26 Mar 2025 07:31:51 -0000
From: "tip-bot2 for Josh Poimboeuf" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Stephen Rothwell <sfr@...b.auug.org.au>,
Josh Poimboeuf <jpoimboe@...nel.org>, Ingo Molnar <mingo@...nel.org>,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: objtool/urgent] objtool: Fix NULL printf() '%s' argument in
builtin-check.c:save_argv()
The following commit has been merged into the objtool/urgent branch of tip:
Commit-ID: 89721c2ca8aec6f45166acf61ae32f64f2f1d2db
Gitweb: https://git.kernel.org/tip/89721c2ca8aec6f45166acf61ae32f64f2f1d2db
Author: Josh Poimboeuf <jpoimboe@...nel.org>
AuthorDate: Tue, 25 Mar 2025 18:30:37 -07:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Wed, 26 Mar 2025 08:24:59 +01:00
objtool: Fix NULL printf() '%s' argument in builtin-check.c:save_argv()
It's probably not the best idea to pass a string pointer to printf()
right after confirming said pointer is NULL. Fix the typo and use
argv[i] instead.
Fixes: c5995abe1547 ("objtool: Improve error handling")
Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Tested-by: Stephen Rothwell <sfr@...b.auug.org.au>
Link: https://lore.kernel.org/r/a814ed8b08fb410be29498a20a5fbbb26e907ecf.1742952512.git.jpoimboe@kernel.org
Closes: https://lore.kernel.org/20250326103854.309e3c60@canb.auug.org.au
---
tools/objtool/builtin-check.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c
index 2bdff91..e364ab6 100644
--- a/tools/objtool/builtin-check.c
+++ b/tools/objtool/builtin-check.c
@@ -238,7 +238,7 @@ static void save_argv(int argc, const char **argv)
for (int i = 0; i < argc; i++) {
orig_argv[i] = strdup(argv[i]);
if (!orig_argv[i]) {
- WARN_GLIBC("strdup(%s)", orig_argv[i]);
+ WARN_GLIBC("strdup(%s)", argv[i]);
exit(1);
}
};
Powered by blists - more mailing lists