Skip to content

nm-dispatcher: fix crash when parsing output dictionary

Beniamino Galvani requested to merge bg/fix-dispatcher-crash into main


'stdout' is NULL when the script didn't write anything or failed.

Fixes the following crash detected by NMCI in test 'dispatcher_device_handler_dummy'.

      nm-dispatcher[936339]: g_strsplit: assertion 'string != NULL' failed

      build_result_options (nm-dispatcher)
      complete_request (nm-dispatcher)
      complete_script (nm-dispatcher)
      script_watch_cb (nm-dispatcher)
      g_child_watch_dispatch (
      g_main_dispatch (
      g_main_context_iterate (
      g_main_context_iteration (
      main (nm-dispatcher)
      __libc_start_main (
      _start (nm-dispatcher)

Fixes: d72f26b8 ('dispatcher: read device-handler's stdout into a dictionary')


Edited by Beniamino Galvani

Merge request reports