commit
5408244bc4
@ -0,0 +1 @@
|
||||
SOURCES/libqmi-1.34.0.tar.bz2
|
@ -0,0 +1 @@
|
||||
e334503461000fccf5788f45c6ac0050b3ff2bad SOURCES/libqmi-1.34.0.tar.bz2
|
@ -0,0 +1,28 @@
|
||||
From a87202030adf1fc1c1082a20e778ca7eaf46bcca Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Thu, 23 May 2024 10:02:20 +0200
|
||||
Subject: [PATCH 1/9] test-fixture: assert the service type index fits into
|
||||
service_info[]
|
||||
|
||||
Largest QmiService is QMI_SERVICE_SSC=0x190 (400 dec) whereas
|
||||
service_info[] has 255 elements. This made a static analyzer
|
||||
frown. Make it happy again!
|
||||
---
|
||||
src/libqmi-glib/test/test-fixture.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/libqmi-glib/test/test-fixture.c b/src/libqmi-glib/test/test-fixture.c
|
||||
index cfbc2b49..32049c67 100644
|
||||
--- a/src/libqmi-glib/test/test-fixture.c
|
||||
+++ b/src/libqmi-glib/test/test-fixture.c
|
||||
@@ -51,6 +51,7 @@ device_allocate_client_ready (QmiDevice *device,
|
||||
|
||||
service = qmi_client_get_service (client);
|
||||
g_assert (service > QMI_SERVICE_CTL);
|
||||
+ g_assert ((unsigned)service < G_N_ELEMENTS (fixture->service_info));
|
||||
fixture->service_info[service].client = client;
|
||||
fixture->service_info[service].transaction_id = 0x0001;
|
||||
test_fixture_loop_stop (fixture);
|
||||
--
|
||||
2.45.2
|
||||
|
@ -0,0 +1,28 @@
|
||||
From 489dde670fd2b5e6721876279dce03f3a4002d44 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Thu, 23 May 2024 10:46:56 +0200
|
||||
Subject: [PATCH 2/9] swi-update: close the file handle even if it's zero
|
||||
|
||||
Technically, zero is a perfectly fine file descriptor for open() to
|
||||
return in case the parent process feels frivolous and chooses to
|
||||
close stdin.
|
||||
---
|
||||
utils/swi-update.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/utils/swi-update.c b/utils/swi-update.c
|
||||
index 609c5baa..61cd71c9 100644
|
||||
--- a/utils/swi-update.c
|
||||
+++ b/utils/swi-update.c
|
||||
@@ -867,7 +867,7 @@ static int download_image(int serfd, char *buf, const char *image)
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
out:
|
||||
- if (imgfd > 0)
|
||||
+ if (imgfd >= 0)
|
||||
close(imgfd);
|
||||
return ret;
|
||||
}
|
||||
--
|
||||
2.45.2
|
||||
|
@ -0,0 +1,162 @@
|
||||
From 6de3d5c2481b219271ee747739995266d5f76ba0 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Thu, 23 May 2024 10:06:47 +0200
|
||||
Subject: [PATCH 3/9] qmicli: avoid leaking the input messages
|
||||
|
||||
In various places in we follow this pattern:
|
||||
|
||||
input = qmi_message_uim_power_on_sim_input_new ();
|
||||
if (bad arguments) {
|
||||
complain();
|
||||
return; // leak input
|
||||
}
|
||||
issue_message(input);
|
||||
|
||||
Let's, instead, always do the argument sanity checks before allocating
|
||||
the message, to avoid leaking the message.
|
||||
---
|
||||
src/qmicli/qmicli-uim.c | 8 ++++----
|
||||
src/qmicli/qmicli-wds.c | 31 +++++++++++++++++++++----------
|
||||
2 files changed, 25 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/qmicli/qmicli-uim.c b/src/qmicli/qmicli-uim.c
|
||||
index e344a682..2238c55b 100644
|
||||
--- a/src/qmicli/qmicli-uim.c
|
||||
+++ b/src/qmicli/qmicli-uim.c
|
||||
@@ -849,13 +849,13 @@ power_on_sim_input_create (const gchar *slot_str)
|
||||
guint slot;
|
||||
GError *error = NULL;
|
||||
|
||||
- input = qmi_message_uim_power_on_sim_input_new ();
|
||||
-
|
||||
if (!qmicli_read_uint_from_string (slot_str, &slot) || (slot > G_MAXUINT8)) {
|
||||
g_printerr ("error: invalid slot number\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+ input = qmi_message_uim_power_on_sim_input_new ();
|
||||
+
|
||||
if (!qmi_message_uim_power_on_sim_input_set_slot (input, slot, &error)) {
|
||||
g_printerr ("error: could not create SIM power on input: %s\n", error->message);
|
||||
g_error_free (error);
|
||||
@@ -907,13 +907,13 @@ power_off_sim_input_create (const gchar *slot_str)
|
||||
guint slot;
|
||||
GError *error = NULL;
|
||||
|
||||
- input = qmi_message_uim_power_off_sim_input_new ();
|
||||
-
|
||||
if (!qmicli_read_uint_from_string (slot_str, &slot) || (slot > G_MAXUINT8)) {
|
||||
g_printerr ("error: invalid slot number\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+ input = qmi_message_uim_power_off_sim_input_new ();
|
||||
+
|
||||
if (!qmi_message_uim_power_off_sim_input_set_slot (input, slot, &error)) {
|
||||
g_printerr ("error: could not create SIM power off input: %s\n", error->message);
|
||||
g_error_free (error);
|
||||
diff --git a/src/qmicli/qmicli-wds.c b/src/qmicli/qmicli-wds.c
|
||||
index 66a9d7cd..0bae3b40 100644
|
||||
--- a/src/qmicli/qmicli-wds.c
|
||||
+++ b/src/qmicli/qmicli-wds.c
|
||||
@@ -3197,14 +3197,14 @@ qmicli_wds_run (QmiDevice *device,
|
||||
#if defined HAVE_QMI_MESSAGE_WDS_SET_IP_FAMILY
|
||||
if (set_ip_family_str) {
|
||||
QmiMessageWdsSetIpFamilyInput *input;
|
||||
+ QmiWdsIpFamily preference;
|
||||
|
||||
- input = qmi_message_wds_set_ip_family_input_new ();
|
||||
switch (atoi (set_ip_family_str)) {
|
||||
case 4:
|
||||
- qmi_message_wds_set_ip_family_input_set_preference (input, QMI_WDS_IP_FAMILY_IPV4, NULL);
|
||||
+ preference = QMI_WDS_IP_FAMILY_IPV4;
|
||||
break;
|
||||
case 6:
|
||||
- qmi_message_wds_set_ip_family_input_set_preference (input, QMI_WDS_IP_FAMILY_IPV6, NULL);
|
||||
+ preference = QMI_WDS_IP_FAMILY_IPV6;
|
||||
break;
|
||||
default:
|
||||
g_printerr ("error: unknown IP type '%s' (not 4 or 6)\n",
|
||||
@@ -3212,6 +3212,10 @@ qmicli_wds_run (QmiDevice *device,
|
||||
operation_shutdown (FALSE);
|
||||
return;
|
||||
}
|
||||
+
|
||||
+ input = qmi_message_wds_set_ip_family_input_new ();
|
||||
+ qmi_message_wds_set_ip_family_input_set_preference (input, preference, NULL);
|
||||
+
|
||||
g_debug ("Asynchronously set IP family...");
|
||||
qmi_client_wds_set_ip_family (client,
|
||||
input,
|
||||
@@ -3441,7 +3445,6 @@ qmicli_wds_run (QmiDevice *device,
|
||||
guint profile_index;
|
||||
|
||||
split = g_strsplit (delete_profile_str, ",", -1);
|
||||
- input = qmi_message_wds_delete_profile_input_new ();
|
||||
|
||||
if (g_strv_length (split) != 2) {
|
||||
g_printerr ("error: expected 2 arguments for delete profile command\n");
|
||||
@@ -3471,6 +3474,8 @@ qmicli_wds_run (QmiDevice *device,
|
||||
return;
|
||||
}
|
||||
|
||||
+ input = qmi_message_wds_delete_profile_input_new ();
|
||||
+
|
||||
qmi_message_wds_delete_profile_input_set_profile_identifier (input, profile_type, (guint8)profile_index, NULL);
|
||||
|
||||
g_strfreev (split);
|
||||
@@ -3490,12 +3495,12 @@ qmicli_wds_run (QmiDevice *device,
|
||||
#if defined HAVE_QMI_MESSAGE_WDS_GET_PROFILE_LIST && defined HAVE_QMI_MESSAGE_WDS_GET_PROFILE_SETTINGS
|
||||
if (get_profile_list_str) {
|
||||
QmiMessageWdsGetProfileListInput *input;
|
||||
+ QmiWdsProfileType profile_type;
|
||||
|
||||
- input = qmi_message_wds_get_profile_list_input_new ();
|
||||
if (g_str_equal (get_profile_list_str, "3gpp"))
|
||||
- qmi_message_wds_get_profile_list_input_set_profile_type (input, QMI_WDS_PROFILE_TYPE_3GPP, NULL);
|
||||
+ profile_type = QMI_WDS_PROFILE_TYPE_3GPP;
|
||||
else if (g_str_equal (get_profile_list_str, "3gpp2"))
|
||||
- qmi_message_wds_get_profile_list_input_set_profile_type (input, QMI_WDS_PROFILE_TYPE_3GPP2, NULL);
|
||||
+ profile_type = QMI_WDS_PROFILE_TYPE_3GPP2;
|
||||
else {
|
||||
g_printerr ("error: invalid profile type '%s'. Expected '3gpp' or '3gpp2'.'\n",
|
||||
get_profile_list_str);
|
||||
@@ -3503,6 +3508,9 @@ qmicli_wds_run (QmiDevice *device,
|
||||
return;
|
||||
}
|
||||
|
||||
+ input = qmi_message_wds_get_profile_list_input_new ();
|
||||
+ qmi_message_wds_get_profile_list_input_set_profile_type (input, profile_type, NULL);
|
||||
+
|
||||
g_debug ("Asynchronously get profile list...");
|
||||
qmi_client_wds_get_profile_list (ctx->client,
|
||||
input,
|
||||
@@ -3574,12 +3582,12 @@ qmicli_wds_run (QmiDevice *device,
|
||||
#if defined HAVE_QMI_MESSAGE_WDS_GET_DEFAULT_SETTINGS
|
||||
if (get_default_settings_str) {
|
||||
QmiMessageWdsGetDefaultSettingsInput *input;
|
||||
+ QmiWdsProfileType profile_type;
|
||||
|
||||
- input = qmi_message_wds_get_default_settings_input_new ();
|
||||
if (g_str_equal (get_default_settings_str, "3gpp"))
|
||||
- qmi_message_wds_get_default_settings_input_set_profile_type (input, QMI_WDS_PROFILE_TYPE_3GPP, NULL);
|
||||
+ profile_type = QMI_WDS_PROFILE_TYPE_3GPP;
|
||||
else if (g_str_equal (get_default_settings_str, "3gpp2"))
|
||||
- qmi_message_wds_get_default_settings_input_set_profile_type (input, QMI_WDS_PROFILE_TYPE_3GPP2, NULL);
|
||||
+ profile_type = QMI_WDS_PROFILE_TYPE_3GPP2;
|
||||
else {
|
||||
g_printerr ("error: invalid default type '%s'. Expected '3gpp' or '3gpp2'.'\n",
|
||||
get_default_settings_str);
|
||||
@@ -3587,6 +3595,9 @@ qmicli_wds_run (QmiDevice *device,
|
||||
return;
|
||||
}
|
||||
|
||||
+ input = qmi_message_wds_get_default_settings_input_new ();
|
||||
+ qmi_message_wds_get_default_settings_input_set_profile_type (input, profile_type, NULL);
|
||||
+
|
||||
g_debug ("Asynchronously get default settings...");
|
||||
qmi_client_wds_get_default_settings (ctx->client,
|
||||
input,
|
||||
--
|
||||
2.45.2
|
||||
|
@ -0,0 +1,52 @@
|
||||
From 71e28cdb5e203715f5b75ee2930faa0416579b3d Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Thu, 23 May 2024 10:33:46 +0200
|
||||
Subject: [PATCH 4/9] qmicli-dms: do not leak split[]
|
||||
|
||||
In various places we fail to free up whatever g_strsplit() returned in
|
||||
error handling paths. Let's use automatic pointers in those cases.
|
||||
---
|
||||
src/qmicli/qmicli-dms.c | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/qmicli/qmicli-dms.c b/src/qmicli/qmicli-dms.c
|
||||
index 8108f0a6..1bea9ad4 100644
|
||||
--- a/src/qmicli/qmicli-dms.c
|
||||
+++ b/src/qmicli/qmicli-dms.c
|
||||
@@ -2070,14 +2070,13 @@ static QmiMessageDmsActivateManualInput *
|
||||
activate_manual_input_create (const gchar *str)
|
||||
{
|
||||
QmiMessageDmsActivateManualInput *input;
|
||||
- gchar **split;
|
||||
+ g_auto(GStrv) split = NULL;
|
||||
GError *error = NULL;
|
||||
gulong split_1_int;
|
||||
|
||||
split = g_strsplit (str, ",", -1);
|
||||
if (g_strv_length (split) != 4) {
|
||||
g_printerr ("error: incorrect number of arguments given\n");
|
||||
- g_strfreev (split);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -2103,7 +2102,6 @@ activate_manual_input_create (const gchar *str)
|
||||
input = NULL;
|
||||
}
|
||||
|
||||
- g_strfreev(split);
|
||||
return input;
|
||||
}
|
||||
|
||||
@@ -3184,8 +3182,8 @@ get_stored_image (QmiClientDms *client,
|
||||
gpointer user_data)
|
||||
{
|
||||
GetStoredImageContext *operation_ctx;
|
||||
+ g_auto(GStrv) split = NULL;
|
||||
GTask *task;
|
||||
- gchar **split;
|
||||
guint i = 0;
|
||||
gint modem_index = -1;
|
||||
gint pri_index = -1;
|
||||
--
|
||||
2.45.2
|
||||
|
@ -0,0 +1,156 @@
|
||||
From b5a9b693d04d2236b24455249408432a02b89484 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Thu, 23 May 2024 10:40:57 +0200
|
||||
Subject: [PATCH 5/9] qmicli-dms: use automatic pointers for split strings
|
||||
|
||||
Do it for consistence's sake but also because it's apparently an easy
|
||||
thing to mess up.
|
||||
|
||||
No change in behavior, purely a cosmetic change.
|
||||
---
|
||||
src/qmicli/qmicli-dms.c | 24 ++++++++----------------
|
||||
1 file changed, 8 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/qmicli/qmicli-dms.c b/src/qmicli/qmicli-dms.c
|
||||
index 1bea9ad4..d001656f 100644
|
||||
--- a/src/qmicli/qmicli-dms.c
|
||||
+++ b/src/qmicli/qmicli-dms.c
|
||||
@@ -941,7 +941,7 @@ static QmiMessageDmsUimSetPinProtectionInput *
|
||||
uim_set_pin_protection_input_create (const gchar *str)
|
||||
{
|
||||
QmiMessageDmsUimSetPinProtectionInput *input = NULL;
|
||||
- gchar **split;
|
||||
+ g_auto(GStrv) split = NULL;
|
||||
QmiDmsUimPinId pin_id;
|
||||
gboolean enable_disable;
|
||||
gchar *current_pin;
|
||||
@@ -970,7 +970,6 @@ uim_set_pin_protection_input_create (const gchar *str)
|
||||
input = NULL;
|
||||
}
|
||||
}
|
||||
- g_strfreev (split);
|
||||
|
||||
return input;
|
||||
}
|
||||
@@ -1030,7 +1029,7 @@ static QmiMessageDmsUimVerifyPinInput *
|
||||
uim_verify_pin_input_create (const gchar *str)
|
||||
{
|
||||
QmiMessageDmsUimVerifyPinInput *input = NULL;
|
||||
- gchar **split;
|
||||
+ g_auto(GStrv) split = NULL;
|
||||
QmiDmsUimPinId pin_id;
|
||||
gchar *current_pin;
|
||||
|
||||
@@ -1056,7 +1055,6 @@ uim_verify_pin_input_create (const gchar *str)
|
||||
input = NULL;
|
||||
}
|
||||
}
|
||||
- g_strfreev (split);
|
||||
|
||||
return input;
|
||||
}
|
||||
@@ -1116,7 +1114,7 @@ static QmiMessageDmsUimUnblockPinInput *
|
||||
uim_unblock_pin_input_create (const gchar *str)
|
||||
{
|
||||
QmiMessageDmsUimUnblockPinInput *input = NULL;
|
||||
- gchar **split;
|
||||
+ g_auto(GStrv) split = NULL;
|
||||
QmiDmsUimPinId pin_id;
|
||||
gchar *puk;
|
||||
gchar *new_pin;
|
||||
@@ -1145,7 +1143,6 @@ uim_unblock_pin_input_create (const gchar *str)
|
||||
input = NULL;
|
||||
}
|
||||
}
|
||||
- g_strfreev (split);
|
||||
|
||||
return input;
|
||||
}
|
||||
@@ -1205,7 +1202,7 @@ static QmiMessageDmsUimChangePinInput *
|
||||
uim_change_pin_input_create (const gchar *str)
|
||||
{
|
||||
QmiMessageDmsUimChangePinInput *input = NULL;
|
||||
- gchar **split;
|
||||
+ g_auto(GStrv) split = NULL;
|
||||
QmiDmsUimPinId pin_id;
|
||||
gchar *old_pin;
|
||||
gchar *new_pin;
|
||||
@@ -1234,7 +1231,6 @@ uim_change_pin_input_create (const gchar *str)
|
||||
input = NULL;
|
||||
}
|
||||
}
|
||||
- g_strfreev (split);
|
||||
|
||||
return input;
|
||||
}
|
||||
@@ -1567,7 +1563,7 @@ static QmiMessageDmsUimSetCkProtectionInput *
|
||||
uim_set_ck_protection_input_create (const gchar *str)
|
||||
{
|
||||
QmiMessageDmsUimSetCkProtectionInput *input = NULL;
|
||||
- gchar **split;
|
||||
+ g_auto(GStrv) split = NULL;
|
||||
QmiDmsUimFacility facility;
|
||||
gboolean enable_disable;
|
||||
gchar *key;
|
||||
@@ -1602,7 +1598,6 @@ uim_set_ck_protection_input_create (const gchar *str)
|
||||
}
|
||||
}
|
||||
}
|
||||
- g_strfreev (split);
|
||||
|
||||
return input;
|
||||
}
|
||||
@@ -1658,7 +1653,7 @@ static QmiMessageDmsUimUnblockCkInput *
|
||||
uim_unblock_ck_input_create (const gchar *str)
|
||||
{
|
||||
QmiMessageDmsUimUnblockCkInput *input = NULL;
|
||||
- gchar **split;
|
||||
+ g_auto(GStrv) split = NULL;
|
||||
QmiDmsUimFacility facility;
|
||||
gchar *key;
|
||||
|
||||
@@ -1684,7 +1679,6 @@ uim_unblock_ck_input_create (const gchar *str)
|
||||
input = NULL;
|
||||
}
|
||||
}
|
||||
- g_strfreev (split);
|
||||
|
||||
return input;
|
||||
}
|
||||
@@ -2234,7 +2228,7 @@ static QmiMessageDmsSetUserLockStateInput *
|
||||
set_user_lock_state_input_create (const gchar *str)
|
||||
{
|
||||
QmiMessageDmsSetUserLockStateInput *input = NULL;
|
||||
- gchar **split;
|
||||
+ g_auto(GStrv) split = NULL;
|
||||
gboolean enable_disable;
|
||||
gchar *code;
|
||||
|
||||
@@ -2261,7 +2255,6 @@ set_user_lock_state_input_create (const gchar *str)
|
||||
input = NULL;
|
||||
}
|
||||
}
|
||||
- g_strfreev (split);
|
||||
|
||||
return input;
|
||||
}
|
||||
@@ -2304,7 +2297,7 @@ static QmiMessageDmsSetUserLockCodeInput *
|
||||
set_user_lock_code_input_create (const gchar *str)
|
||||
{
|
||||
QmiMessageDmsSetUserLockCodeInput *input = NULL;
|
||||
- gchar **split;
|
||||
+ g_auto(GStrv) split = NULL;
|
||||
gchar *old_code;
|
||||
gchar *new_code;
|
||||
|
||||
@@ -2330,7 +2323,6 @@ set_user_lock_code_input_create (const gchar *str)
|
||||
input = NULL;
|
||||
}
|
||||
}
|
||||
- g_strfreev (split);
|
||||
|
||||
return input;
|
||||
}
|
||||
--
|
||||
2.45.2
|
||||
|
@ -0,0 +1,26 @@
|
||||
From b723ac5dbf5d055a614fdb8e2b755c086e47c086 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Thu, 23 May 2024 10:56:12 +0200
|
||||
Subject: [PATCH 6/9] qmicli-dms: do not leak result on error
|
||||
|
||||
The result is not properly disposed in error handling path, resulting
|
||||
in a potential leak.
|
||||
---
|
||||
src/qmicli/qmicli-dms.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/qmicli/qmicli-dms.c b/src/qmicli/qmicli-dms.c
|
||||
index d001656f..afba1e19 100644
|
||||
--- a/src/qmicli/qmicli-dms.c
|
||||
+++ b/src/qmicli/qmicli-dms.c
|
||||
@@ -3136,6 +3136,7 @@ get_stored_image_list_stored_images_ready (QmiClientDms *client,
|
||||
qmi_message_dms_list_stored_images_output_unref (output);
|
||||
g_object_unref (task);
|
||||
operation_shutdown (FALSE);
|
||||
+ get_stored_image_result_free (result);
|
||||
return;
|
||||
}
|
||||
|
||||
--
|
||||
2.45.2
|
||||
|
@ -0,0 +1,24 @@
|
||||
From b68d1760f81377dcf807e969a78671f19af38993 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Thu, 23 May 2024 10:25:45 +0200
|
||||
Subject: [PATCH 7/9] qmicli-nas: avoid leaking mnc
|
||||
|
||||
---
|
||||
src/qmicli/qmicli-nas.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/qmicli/qmicli-nas.c b/src/qmicli/qmicli-nas.c
|
||||
index c51a5b02..7f69bfb9 100644
|
||||
--- a/src/qmicli/qmicli-nas.c
|
||||
+++ b/src/qmicli/qmicli-nas.c
|
||||
@@ -3837,6 +3837,7 @@ get_operator_name_ready (QmiClientNas *client,
|
||||
element->lac1,
|
||||
element->lac2,
|
||||
element->plmn_name_record_identifier);
|
||||
+ g_free(mnc);
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.45.2
|
||||
|
@ -0,0 +1,25 @@
|
||||
From e7651c90e8d081371486deabd44db2b796a546f1 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Thu, 23 May 2024 10:45:34 +0200
|
||||
Subject: [PATCH 8/9] qmicli-pdc: avoid leaking file_contents[]
|
||||
|
||||
Release it when not needed any more.
|
||||
---
|
||||
src/qmicli/qmicli-pdc.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/qmicli/qmicli-pdc.c b/src/qmicli/qmicli-pdc.c
|
||||
index 8139ef4b..4e7a19c4 100644
|
||||
--- a/src/qmicli/qmicli-pdc.c
|
||||
+++ b/src/qmicli/qmicli-pdc.c
|
||||
@@ -1127,6 +1127,7 @@ load_config_file_from_string (const gchar *str)
|
||||
hash_size = g_checksum_type_get_length (G_CHECKSUM_SHA1);
|
||||
checksum = g_checksum_new (G_CHECKSUM_SHA1);
|
||||
g_checksum_update (checksum, file_contents, file_size);
|
||||
+ g_free (file_contents);
|
||||
|
||||
data = g_slice_new (LoadConfigFileData);
|
||||
data->mapped_file = g_mapped_file_ref (mapped_file);
|
||||
--
|
||||
2.45.2
|
||||
|
@ -0,0 +1,37 @@
|
||||
From dadd1683067e13199a535cca71b5e3bc4029f056 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Thu, 23 May 2024 10:51:14 +0200
|
||||
Subject: [PATCH 9/9] qmicli-ims: fix a silly argument mixup
|
||||
|
||||
Possibly a cut'n'paste oversight or something.
|
||||
---
|
||||
src/qmicli/qmicli-ims.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/qmicli/qmicli-ims.c b/src/qmicli/qmicli-ims.c
|
||||
index 880aeec7..b690597a 100644
|
||||
--- a/src/qmicli/qmicli-ims.c
|
||||
+++ b/src/qmicli/qmicli-ims.c
|
||||
@@ -195,16 +195,16 @@ get_services_enabled_ready (QmiClientIms *client,
|
||||
g_print ("[%s] IMS services:\n", qmi_device_get_path_display (ctx->device));
|
||||
|
||||
if (qmi_message_ims_get_ims_services_enabled_setting_output_get_ims_voice_service_enabled (output, &service_voice_enabled, NULL))
|
||||
- g_print ("\t IMS registration enabled: %s\n", service_ims_registration_enabled? "yes" : "no");
|
||||
+ g_print ("\t Voice service enabled: %s\n", service_voice_enabled? "yes" : "no");
|
||||
|
||||
if (qmi_message_ims_get_ims_services_enabled_setting_output_get_ims_video_telephony_service_enabled (output, &service_vt_enabled, NULL))
|
||||
- g_print ("\t Voice service enabled: %s\n", service_voice_enabled? "yes" : "no");
|
||||
+ g_print ("\tVideo Telephony service enabled: %s\n", service_vt_enabled? "yes" : "no");
|
||||
|
||||
if (qmi_message_ims_get_ims_services_enabled_setting_output_get_ims_voice_wifi_service_enabled (output, &service_voice_wifi_enabled, NULL))
|
||||
g_print ("\t Voice WiFi service enabled: %s\n", service_voice_wifi_enabled? "yes" : "no");
|
||||
|
||||
if (qmi_message_ims_get_ims_services_enabled_setting_output_get_ims_registration_service_enabled (output, &service_ims_registration_enabled, NULL))
|
||||
- g_print ("\tVideo Telephony service enabled: %s\n", service_vt_enabled? "yes" : "no");
|
||||
+ g_print ("\t IMS registration enabled: %s\n", service_ims_registration_enabled? "yes" : "no");
|
||||
|
||||
if (qmi_message_ims_get_ims_services_enabled_setting_output_get_ims_ut_service_enabled (output, &service_ut_enabled, NULL))
|
||||
g_print ("\t UE to TAS service enabled: %s\n", service_ut_enabled? "yes" : "no");
|
||||
--
|
||||
2.45.2
|
||||
|
@ -0,0 +1,34 @@
|
||||
From 6662764338d3127924cfefaa9cf1b0cc4f90a189 Mon Sep 17 00:00:00 2001
|
||||
From: Arnaud Ferraris <aferraris@debian.org>
|
||||
Date: Sat, 21 Oct 2023 11:43:09 +0200
|
||||
Subject: [PATCH] libqmi-glib,message: fix 16-bit service on big endian
|
||||
architectures
|
||||
|
||||
The latest release introduces handling of 16-bit service indications.
|
||||
However, only the raw message data is returned from
|
||||
`qmi_message_get_service()`, leading to incorrect values on big-endian
|
||||
architectures. As a consequence, `libqmi` ultimately fails to build as
|
||||
the corresponding test errors out in this case.
|
||||
|
||||
This patch ensures the service indication is correct on all kinds of
|
||||
architectures.
|
||||
---
|
||||
src/libqmi-glib/qmi-message.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/libqmi-glib/qmi-message.c b/src/libqmi-glib/qmi-message.c
|
||||
index 3e31b4b4..1918a456 100644
|
||||
--- a/src/libqmi-glib/qmi-message.c
|
||||
+++ b/src/libqmi-glib/qmi-message.c
|
||||
@@ -226,7 +226,7 @@ qmi_message_get_service (QmiMessage *self)
|
||||
if (MESSAGE_IS_QMUX (self))
|
||||
return (QmiService)((struct full_message *)(self->data))->header.qmux.service;
|
||||
|
||||
- return (QmiService)((struct full_message *)(self->data))->header.qrtr.service;
|
||||
+ return (QmiService)GUINT16_FROM_LE (((struct full_message *)(self->data))->header.qrtr.service);
|
||||
}
|
||||
|
||||
guint8
|
||||
--
|
||||
GitLab
|
||||
|
@ -0,0 +1,304 @@
|
||||
Name: libqmi
|
||||
Version: 1.34.0
|
||||
Release: 7%{?dist}
|
||||
Summary: Support library to use the Qualcomm MSM Interface (QMI) protocol
|
||||
License: LGPL-2.1-or-later
|
||||
URL: http://freedesktop.org/software/libqmi
|
||||
Source: https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/archive/%{version}/%{name}-%{version}.tar.bz2
|
||||
|
||||
# upstream patch for big endian issue
|
||||
# https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/commit/6662764338d3127924cfefaa9cf1b0cc4f90a189
|
||||
Patch0: 6662764338d3127924cfefaa9cf1b0cc4f90a189.patch
|
||||
# All of these are applied upstream, patches can be dropped with rebase to 1.36
|
||||
Patch1: 0001-test-fixture-assert-the-service-type-index-fits-into.patch
|
||||
Patch2: 0002-swi-update-close-the-file-handle-even-if-it-s-zero.patch
|
||||
Patch3: 0003-qmicli-avoid-leaking-the-input-messages.patch
|
||||
Patch4: 0004-qmicli-dms-do-not-leak-split.patch
|
||||
Patch5: 0005-qmicli-dms-use-automatic-pointers-for-split-strings.patch
|
||||
Patch6: 0006-qmicli-dms-do-not-leak-result-on-error.patch
|
||||
Patch7: 0007-qmicli-nas-avoid-leaking-mnc.patch
|
||||
Patch8: 0008-qmicli-pdc-avoid-leaking-file_contents.patch
|
||||
Patch9: 0009-qmicli-ims-fix-a-silly-argument-mixup.patch
|
||||
|
||||
BuildRequires: meson >= 0.53
|
||||
BuildRequires: gcc
|
||||
BuildRequires: glib2-devel >= 2.56
|
||||
BuildRequires: gobject-introspection-devel
|
||||
BuildRequires: gtk-doc
|
||||
BuildRequires: pkgconfig(gudev-1.0) >= 147
|
||||
BuildRequires: libmbim-devel >= 1.18.0
|
||||
BuildRequires: libqrtr-glib-devel
|
||||
BuildRequires: python3
|
||||
BuildRequires: help2man
|
||||
|
||||
%description
|
||||
This package contains the libraries that make it easier to use QMI functionality
|
||||
from applications that use glib.
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Header files for adding QMI support to applications that use glib
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: glib2-devel%{?_isa}
|
||||
Requires: pkgconfig
|
||||
|
||||
%description devel
|
||||
This package contains the header and pkg-config files for development
|
||||
applications using QMI functionality from applications that use glib.
|
||||
|
||||
|
||||
%package utils
|
||||
Summary: Utilities to use the QMI protocol from the command line
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
License: GPL-2.0-or-later
|
||||
|
||||
%description utils
|
||||
This package contains the utilities that make it easier to use QMI functionality
|
||||
from the command line.
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
|
||||
%build
|
||||
# Let's avoid BuildRequiring bash-completion because it changes behavior
|
||||
# of shell, at least until the .pc file gets into the -devel subpackage.
|
||||
# We'll just install the bash-completion file ourselves.
|
||||
%meson -Dgtk_doc=true -Dbash_completion=false
|
||||
%meson_build
|
||||
|
||||
|
||||
%install
|
||||
%meson_install
|
||||
find %{buildroot}%{_datadir}/gtk-doc |xargs touch --reference meson.build
|
||||
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
|
||||
cp -a src/qmicli/qmicli %{buildroot}%{_datadir}/bash-completion/completions/
|
||||
|
||||
|
||||
%check
|
||||
%meson_test
|
||||
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
|
||||
%files
|
||||
%license COPYING.LIB
|
||||
%doc NEWS AUTHORS README.md
|
||||
%{_libdir}/libqmi-glib.so.*
|
||||
%{_libdir}/girepository-1.0/Qmi-1.0.typelib
|
||||
|
||||
|
||||
%files devel
|
||||
%{_includedir}/libqmi-glib/
|
||||
%{_libdir}/pkgconfig/qmi-glib.pc
|
||||
%{_libdir}/libqmi-glib.so
|
||||
%{_datadir}/gtk-doc/html/libqmi-glib/
|
||||
%{_datadir}/gir-1.0/Qmi-1.0.gir
|
||||
|
||||
|
||||
%files utils
|
||||
%license COPYING
|
||||
%{_bindir}/qmicli
|
||||
%{_bindir}/qmi-network
|
||||
%{_bindir}/qmi-firmware-update
|
||||
%{_datadir}/bash-completion
|
||||
%{_libexecdir}/qmi-proxy
|
||||
%{_mandir}/man1/*
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Jun 25 2024 Lubomir Rintel <lkundrak@v3.sk> - 1.34.0-7
|
||||
- Add patches for a pair of bugs that make static analysis unhappy (RHEL-38475)
|
||||
|
||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.34.0-6
|
||||
- Bump release for June 2024 mass rebuild
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.34.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.34.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Tue Jan 09 2024 Dennis Gilmore <dennis@ausil.us> - 1.34.0-1
|
||||
- update to 1.34.0
|
||||
|
||||
* Thu Nov 2 2023 Íñigo Huguet <ihuguet@redhat.com> - 1.32.4-3
|
||||
- migrated to SPDX license
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.32.4-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Fri Mar 24 2023 Lubomir Rintel <lkundrak@v3.sk> - 1.32.4-1
|
||||
- Update to 1.32.4
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.32.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Mon Jan 02 2023 Lubomir Rintel <lkundrak@v3.sk> - 1.32.2-2
|
||||
- Fix bash completion files path
|
||||
|
||||
* Tue Nov 22 2022 Lubomir Rintel <lkundrak@v3.sk> - 1.32.2-1
|
||||
- Update to 1.32.2
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.30.6-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Sat May 14 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 1.30.6-1
|
||||
- Update to 1.30.6
|
||||
|
||||
* Sat Feb 12 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 1.30.4-1
|
||||
- Update to 1.30.4
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.30.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Thu Sep 09 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 1.30.2-1
|
||||
- Update to 1.30.2
|
||||
|
||||
* Sat Aug 14 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 1.30.0-1
|
||||
- Update to 1.30.0
|
||||
|
||||
* Wed Aug 04 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 1.28.8-1
|
||||
- Update to 1.28.8
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.28.6-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Sat Jun 05 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 1.28.6-1
|
||||
- Update to 1.28.6
|
||||
|
||||
* Tue Apr 13 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 1.28.2-1
|
||||
- Update to 1.28.2
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.26.8-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Sat Jan 16 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 1.26.8-1
|
||||
- Update to 1.26.8
|
||||
|
||||
* Tue Nov 3 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.26.6-1
|
||||
- Update to 1.26.6
|
||||
|
||||
* Fri Aug 28 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.26.4-1
|
||||
- Update to 1.26.4
|
||||
|
||||
* Mon Jul 27 2020 Peter Robinson <pbrobinson@fedoraproject.org>
|
||||
- Update to 1.26.2
|
||||
|
||||
* Tue Mar 24 2020 Lubomir Rintel <lkundrak@v3.sk> - 1.24.8
|
||||
- Update to 1.24.8
|
||||
|
||||
* Thu Mar 5 2020 Peter Robinson <pbrobinson@fedoraproject.org> 1.24.6-1
|
||||
- Update to 1.24.6
|
||||
- Spec cleanups, fix shipped licenses
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.24.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Mon Sep 23 2019 Lubomir Rintel <lkundrak@v3.sk> - 1.24.0
|
||||
- Update to 1.24.0
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.22.4-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Mon May 06 2019 Lubomir Rintel <lkundrak@v3.sk> - 1.22.4-1
|
||||
- Update to 1.22.4
|
||||
|
||||
* Thu Apr 11 2019 Lubomir Rintel <lkundrak@v3.sk> - 1.22.2-1
|
||||
- Update to 1.22.2
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.22.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Tue Jan 15 2019 Lubomir Rintel <lkundrak@v3.sk> - 1.20.0-1
|
||||
- Update to 1.22.0
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.20.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Thu Mar 15 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.20.0-3
|
||||
- Update Python 2 dependency declarations to new packaging standards
|
||||
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.20.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Mon Jan 22 2018 Lubomir Rintel <lkundrak@v3.sk> - 1.20.0-1
|
||||
- Update to 1.20.0
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.0-1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Wed Mar 22 2017 Lubomir Rintel <lkundrak@v3.sk> - 1.18.0-1
|
||||
- Update to 1.18.0
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.16.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Tue Nov 15 2016 Lubomir Rintel <lkundrak@v3.sk> - 1.16.2-1
|
||||
- Update to 1.16.2
|
||||
|
||||
* Tue Oct 04 2016 Lubomir Rintel <lkundrak@v3.sk> - 1.16.0-2
|
||||
- Enable hardening
|
||||
|
||||
* Fri Jul 08 2016 Lubomir Rintel <lkundrak@v3.sk> - 1.16.0-1
|
||||
- Update to 1.16.0
|
||||
|
||||
* Tue May 03 2016 Lubomir Rintel <lkundrak@v3.sk> - 1.14.2-1
|
||||
- Update to 1.14.2
|
||||
|
||||
* Mon Mar 21 2016 Lubomir Rintel <lkundrak@v3.sk> - 1.14.0-1
|
||||
- Update to 1.14.0 release
|
||||
|
||||
* Tue Mar 01 2016 Yaakov Selkowitz <yselkowi@redhat.com> - 1.12.6-3
|
||||
- Fix FTBFS with GCC 6 (#1307733)
|
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.6-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Tue Aug 18 2015 Lubomir Rintel <lkundrak@v3.sk> - 1.12.6-1
|
||||
- Update to 1.12.6 release
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.12.4-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 1.12.4-2
|
||||
- Rebuilt for Fedora 23 Change
|
||||
https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
|
||||
|
||||
* Wed Feb 11 2015 Lubomir Rintel <lkundrak@v3.sk> - 1.12.4-1
|
||||
- Update to 1.12.4 release
|
||||
|
||||
* Tue Feb 10 2015 Lubomir Rintel <lkundrak@v3.sk> - 1.12.2-1
|
||||
- Clean up the spec file a bit
|
||||
- Update to 1.12.2 release
|
||||
|
||||
* Thu Jan 15 2015 Dan Williams <dcbw@redhat.com> - 1.12.0-1
|
||||
- Update to 1.12.0 release
|
||||
|
||||
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
* Tue Aug 5 2014 Dan Williams <dcbw@redhat.com> - 1.10.2
|
||||
- Update to 1.10.2 release
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Sat Feb 1 2014 poma <poma@gmail.com> - 1.8.0-1
|
||||
- Update to 1.8.0 release
|
||||
|
||||
* Fri Sep 6 2013 Dan Williams <dcbw@redhat.com> - 1.6.0-1
|
||||
- Update to 1.6.0 release
|
||||
|
||||
* Fri Jun 7 2013 Dan Williams <dcbw@redhat.com> - 1.4.0-1
|
||||
- Update to 1.4.0 release
|
||||
|
||||
* Fri May 10 2013 Dan Williams <dcbw@redhat.com> - 1.3.0-1.git20130510
|
||||
- Initial Fedora release
|
||||
|
Loading…
Reference in new issue