|
|
ac3a84 |
From 1ef6ffdf0923095752665c7ff6062514dfa6c6bf Mon Sep 17 00:00:00 2001
|
|
|
ac3a84 |
From: Luca Boccassi <bluca@debian.org>
|
|
|
ac3a84 |
Date: Fri, 4 Nov 2022 00:01:16 +0000
|
|
|
ac3a84 |
Subject: [PATCH] firstboot: fix segfault when --locale-messages= is passed
|
|
|
ac3a84 |
without --locale=
|
|
|
ac3a84 |
|
|
|
ac3a84 |
\#0 __strcmp_evex () at ../sysdeps/x86_64/multiarch/strcmp-evex.S:295
|
|
|
ac3a84 |
No locals.
|
|
|
ac3a84 |
\#1 0x0000557444eb172b in process_locale () at ../src/firstboot/firstboot.c:342
|
|
|
ac3a84 |
etc_localeconf = 0x7ffd40217b80 "/root/root/etc/locale.conf"
|
|
|
ac3a84 |
locales = {0x0, 0x0, 0x0}
|
|
|
ac3a84 |
i = 0
|
|
|
ac3a84 |
r = <optimized out>
|
|
|
ac3a84 |
__PRETTY_FUNCTION__ = "process_locale"
|
|
|
ac3a84 |
__func__ = "process_locale"
|
|
|
ac3a84 |
\#2 0x0000557444eaff93 in run (argv=0x7ffd40217d98, argc=3) at ../src/firstboot/firstboot.c:1401
|
|
|
ac3a84 |
loop_device = 0x0
|
|
|
ac3a84 |
unlink_dir = 0x0
|
|
|
ac3a84 |
r = <optimized out>
|
|
|
ac3a84 |
loop_device = <optimized out>
|
|
|
ac3a84 |
unlink_dir = <optimized out>
|
|
|
ac3a84 |
r = <optimized out>
|
|
|
ac3a84 |
__func__ = <optimized out>
|
|
|
ac3a84 |
__PRETTY_FUNCTION__ = <optimized out>
|
|
|
ac3a84 |
enabled = <optimized out>
|
|
|
ac3a84 |
_error = <optimized out>
|
|
|
ac3a84 |
_level = <optimized out>
|
|
|
ac3a84 |
_e = <optimized out>
|
|
|
ac3a84 |
_level = <optimized out>
|
|
|
ac3a84 |
_e = <optimized out>
|
|
|
ac3a84 |
\#3 main (argc=3, argv=0x7ffd40217d98) at ../src/firstboot/firstboot.c:1432
|
|
|
ac3a84 |
r = <optimized out>
|
|
|
ac3a84 |
__PRETTY_FUNCTION__ = "main"
|
|
|
ac3a84 |
|
|
|
ac3a84 |
Fixes https://github.com/systemd/systemd/issues/25249
|
|
|
ac3a84 |
|
|
|
ac3a84 |
(cherry picked from commit 4c4a73ce068ef16cfe7ad07c7c3386ac1dbc58fe)
|
|
|
ac3a84 |
|
|
|
ac3a84 |
Related #2138081
|
|
|
ac3a84 |
---
|
|
|
ac3a84 |
src/firstboot/firstboot.c | 2 +-
|
|
|
ac3a84 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
ac3a84 |
|
|
|
ac3a84 |
diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
|
|
|
ac3a84 |
index 065ee896cd..63db78b52d 100644
|
|
|
ac3a84 |
--- a/src/firstboot/firstboot.c
|
|
|
ac3a84 |
+++ b/src/firstboot/firstboot.c
|
|
|
ac3a84 |
@@ -339,7 +339,7 @@ static int process_locale(void) {
|
|
|
ac3a84 |
|
|
|
ac3a84 |
if (!isempty(arg_locale))
|
|
|
ac3a84 |
locales[i++] = strjoina("LANG=", arg_locale);
|
|
|
ac3a84 |
- if (!isempty(arg_locale_messages) && !streq(arg_locale_messages, arg_locale))
|
|
|
ac3a84 |
+ if (!isempty(arg_locale_messages) && !streq_ptr(arg_locale_messages, arg_locale))
|
|
|
ac3a84 |
locales[i++] = strjoina("LC_MESSAGES=", arg_locale_messages);
|
|
|
ac3a84 |
|
|
|
ac3a84 |
if (i == 0)
|