Skip to content

Fix string leaks when UCAs use a submenu

Leak report

Direct leak of 20 byte(s) in 2 object(s) allocated from:
    #0 0x76146cf20e15 in malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:67
    #1 0x76146abb66e1 in g_malloc glib/gmem.c:100
    #2 0x76146ac1132c in g_strconcat glib/gstrfuncs.c:585
    #3 0x721456fac8f4 in thunar_uca_provider_get_file_menu_items plugins/thunar-uca/thunar-uca-provider.c:301
    #4 0x76146d571739 in IA__thunarx_menu_provider_get_file_menu_items thunarx/thunarx-menu-provider.c:126
    #5 0x721456fac16b in thunar_uca_provider_get_folder_menu_items plugins/thunar-uca/thunar-uca-provider.c:429
    #6 0x76146d571bca in IA__thunarx_menu_provider_get_folder_menu_items thunarx/thunarx-menu-provider.c:182
    #7 0x59abd898cbf2 in thunar_action_manager_append_custom_actions thunar/thunar-action-manager.c:2423
    #8 0x59abd8a5cb04 in thunar_menu_add_sections thunar/thunar-menu.c:335
    #9 0x59abd8aeccdb in thunar_standard_view_context_menu thunar/thunar-standard-view.c:4229
    #10 0x59abd8973805 in thunar_abstract_icon_view_button_press_event thunar/thunar-abstract-icon-view.c:452
[...snip...]

Direct leak of 20 byte(s) in 4 object(s) allocated from:
    #0 0x76146cf20e15 in malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:67
    #1 0x76146abb66e1 in g_malloc glib/gmem.c:100
    #2 0x76146ac10b5e in g_strdup glib/gstrfuncs.c:323
    #3 0x721456facb3f in g_strdup_inline /usr/local/include/glib-2.0/glib/gstrfuncs.h:321
    #4 0x721456facb3f in thunar_uca_provider_get_file_menu_items plugins/thunar-uca/thunar-uca-provider.c:298
    #5 0x76146d571739 in IA__thunarx_menu_provider_get_file_menu_items thunarx/thunarx-menu-provider.c:126
    #6 0x721456fac16b in thunar_uca_provider_get_folder_menu_items plugins/thunar-uca/thunar-uca-provider.c:429
    #7 0x76146d571bca in IA__thunarx_menu_provider_get_folder_menu_items thunarx/thunarx-menu-provider.c:182
    #8 0x59abd898cbf2 in thunar_action_manager_append_custom_actions thunar/thunar-action-manager.c:2423
    #9 0x59abd8a5cb04 in thunar_menu_add_sections thunar/thunar-menu.c:335
    #10 0x59abd8aeccdb in thunar_standard_view_context_menu thunar/thunar-standard-view.c:4229
    #11 0x59abd8973805 in thunar_abstract_icon_view_button_press_event thunar/thunar-abstract-icon-view.c:452
[...snip...]

Testing

  • No issues were detected when testing the patch with UBSan, LSan, ASan, and Valgrind

Merge request reports

Loading