summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-10-23 22:27:36 +0200
committerAleksander Morgado <aleksander@aleksander.es>2021-10-23 23:30:56 +0200
commit32034e483b9b9755901f715681d5f1be12110d00 (patch)
treee6b12c5237287019206be8ca10f68ccd98227983
parentb840b84f5fcb0ba2783093ee6d7ffe5aa122b418 (diff)
libmbim-glib,tlv: fix string reading in BE systems
The data length needs to be converted to HE before using it.
-rw-r--r--src/libmbim-glib/mbim-tlv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmbim-glib/mbim-tlv.c b/src/libmbim-glib/mbim-tlv.c
index df5fba6..ca87edd 100644
--- a/src/libmbim-glib/mbim-tlv.c
+++ b/src/libmbim-glib/mbim-tlv.c
@@ -240,7 +240,7 @@ mbim_tlv_string_get (const MbimTlv *self,
}
utf16 = (const gunichar2 *) MBIM_TLV_FIELD_DATA (self);
- size = MBIM_TLV_FIELD_DATA_LENGTH (self);
+ size = MBIM_TLV_GET_DATA_LENGTH (self);
/* For BE systems, convert from LE to BE */
if (G_BYTE_ORDER == G_BIG_ENDIAN) {