[gnome-control-center/benzea/fprint-remove-incorrect-translations: 7/8] user-accounts: Fix free of const string due to incorrect translations
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/benzea/fprint-remove-incorrect-translations: 7/8] user-accounts: Fix free of const string due to incorrect translations
- Date: Tue, 13 Oct 2020 09:31:01 +0000 (UTC)
commit e80b4b5f58f448c5a3d38721f7bba32c413d46e7
Author: Benjamin Berg <bberg redhat com>
Date: Mon Oct 5 11:00:35 2020 +0200
user-accounts: Fix free of const string due to incorrect translations
A duplicatend and translated string could be passed to gettext another
time. If that string can be translated, then a static string would be
returned rather than the const one, causing an invalid free.
Fixes: #1149
panels/user-accounts/cc-fingerprint-dialog.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/panels/user-accounts/cc-fingerprint-dialog.c b/panels/user-accounts/cc-fingerprint-dialog.c
index 5b9771ca5..874ea73dd 100644
--- a/panels/user-accounts/cc-fingerprint-dialog.c
+++ b/panels/user-accounts/cc-fingerprint-dialog.c
@@ -839,7 +839,7 @@ get_enrollment_string (CcFingerprintDialog *self,
if (have_multiple_devices (self))
device_name = cc_fprintd_device_get_name (self->device);
- ret = TR (finger_str_to_msg (finger_id, device_name, is_swipe));
+ ret = finger_str_to_msg (finger_id, device_name, is_swipe);
if (ret)
return ret;
@@ -852,8 +852,8 @@ enroll_finger (CcFingerprintDialog *self,
const char *finger_id)
{
g_auto(GStrv) tmp_finger_name = NULL;
- g_autofree char *enroll_message = NULL;
g_autofree char *finger_name = NULL;
+ g_autofree char *enroll_message = NULL;
g_return_if_fail (finger_id);
@@ -863,7 +863,7 @@ enroll_finger (CcFingerprintDialog *self,
g_debug ("Enrolling finger %s", finger_id);
- enroll_message = TR (get_enrollment_string (self, finger_id));
+ enroll_message = get_enrollment_string (self, finger_id);
tmp_finger_name = g_strsplit (get_finger_name (finger_id), "_", -1);
finger_name = g_strjoinv ("", tmp_finger_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]