Skip to content

xmm: fix crash parsing XACT? response

Ensure we don't assert when processing an unexpected response.

We were not correctly handling the case where g_match_info_matches() was not succeeding.

  0x00007d8be96cc462 (libc.so.6 + 0x00028462)     abort
  0x00007d8be995ff01 (libglib-2.0.so.0 - gtestutils.c: 3253)      g_assertion_message
  0x00007d8be995ff64 (libglib-2.0.so.0 - gtestutils.c: 3279)      g_assertion_message_expr
  0x00007d8be858086a (libmm-shared-xmm.so - mm-modem-helpers-xmm.c: 467)  mm_xmm_parse_xact_query_response
  0x00007d8be857d4e0 (libmm-shared-xmm.so - mm-shared-xmm.c: 310) xact_query_bands_ready
  0x00007d8be9a79463 (libgio-2.0.so.0 - gsimpleasyncresult.c: 802)        g_simple_async_result_complete
  0x00005c8d2a11e9b9 (ModemManager - mm-base-modem-at.c: 538)     at_command_ready
  0x00007d8be9a79463 (libgio-2.0.so.0 - gsimpleasyncresult.c: 802)        g_simple_async_result_complete
  0x00005c8d2a19376b (ModemManager - mm-port-serial-at.c) serial_command_ready
  0x00007d8be9a79463 (libgio-2.0.so.0 - gsimpleasyncresult.c: 802)        g_simple_async_result_complete
  0x00005c8d2a18f93f (ModemManager - mm-port-serial.c: 139)       command_context_complete_and_free
  0x00005c8d2a192985 (ModemManager - mm-port-serial.c: 753)       port_serial_got_response
  0x00005c8d2a192dff (ModemManager - mm-port-serial.c: 924)       common_input_available
  0x00007d8be993e3fc (libglib-2.0.so.0 - gmain.c: 3417)   g_main_context_dispatch
  0x00007d8be993e704 (libglib-2.0.so.0 - gmain.c: 4211)   g_main_context_iterate
  0x00007d8be993e978 (libglib-2.0.so.0 - gmain.c: 4411)   g_main_loop_run
  0x00005c8d2a105e66 (ModemManager - main.c: 217) main
  0x00007d8be96cc6c5 (libc.so.6 + 0x000286c5)     __libc_init_first
  0x00007d8be96cc781 (libc.so.6 + 0x00028781)     __libc_start_main
  0x00005c8d2a105b80 (ModemManager + 0x00061b80)  _start

Merge request reports

Loading