UPSTREAM: libmbim-glib,tlv: allow 0-length strings for MBIM_TLV_TYPE_WCHAR_STR

Document Microsoft MBIM Extensions for 5G (rev 1.17) considers the possibility
of having wchar strings tlvs with datalength == 0 in the information buffer
(e.g. AccessString field in MBIM_CONNECT_INFO_EX3 data structure).

Modify mbim_tlv_string_get for dealing with these situations, returning an
empty string.

(cherry picked from commit 23363567bcc5bccb169d3730ea128f631bb42570)

BUG=b:266843679
TEST=No crashes during connection attempt

Disallow-Recycled-Builds: test-failures
Change-Id: I5f989a2f921e0d73f53589915b98064ac1eab0f7
2 files changed
tree: 4b51471b3ecb711fae3cb12b7dab82e625f036f9
  1. build-aux/
  2. data/
  3. docs/
  4. examples/
  5. LICENSES/
  6. src/
  7. utils/
  8. .gitignore
  9. .gitlab-ci.yml
  10. AUTHORS
  11. DIR_METADATA
  12. meson.build
  13. meson_options.txt
  14. NEWS
  15. OWNERS
  16. PRESUBMIT.cfg
  17. README.chromium
  18. README.md
  19. RELEASING
  20. unblocked_terms.txt
README.md

libmbim

libmbim is a glib-based library for talking to WWAN modems and devices which speak the Mobile Broadband Interface Model (MBIM) protocol.

Documentation

Project documentation is kept in: https://modemmanager.org/docs/libmbim/

License

  • libmbim-glib library is released under the LGPL-2.1-or-later license.
  • mbimcli and mbim-network tools are released under the GPL-2.0-or-later license.

License texts can be found under the LICENSES folder.

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms, which you can find in the following link: https://www.freedesktop.org/wiki/CodeOfConduct CoC issues may be raised to the project maintainers at the following address: libmbim-devel-owner@lists.freedesktop.org