Skip to content

Fix string leaks in notification_plugin_menu_new

correctmost requested to merge correctmost/xfce4-notifyd:cm/fix-str-leaks into master

Leak report

Direct leak of 128 byte(s) in 1 object(s) allocated from:
    #0 0x700e1bafc542 in realloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:85
    #1 0x700e184b8c27 in g_realloc glib/gmem.c:171
    #2 0x700e1852ada8 in g_string_expand glib/gstring.c:82
    #3 0x700e1852af77 in g_string_sized_new glib/gstring.c:113
    #4 0x700e1852cb4b in g_string_new glib/gstring.c:134
    #5 0x700e184383e6 in g_build_path_va glib/gfileutils.c:1914
    #6 0x700e1843bbcf in g_build_filename_va glib/gfileutils.c:2207
    #7 0x700e1843bbcf in g_build_filename glib/gfileutils.c:2301
    #8 0x700e1a58be3f in xfce_resource_save_location libxfce4util/libxfce4util/xfce-resource.c:787
    #9 0x700e0f756035 in notification_plugin_menu_new panel-plugin/notification-plugin-log.c:128
    #10 0x700e0f752971 in notification_plugin_popup_menu panel-plugin/notification-plugin.c:57
[...snip...]

Direct leak of 14 byte(s) in 1 object(s) allocated from:
    #0 0x700e1bafd891 in malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x700e184b8b87 in g_malloc glib/gmem.c:100
    #2 0x700e18520ecf in g_strdup glib/gstrfuncs.c:323
    #3 0x700e1a1a23dd in g_strdup_inline /usr/local/include/glib-2.0/glib/gstrfuncs.h:321
    #4 0x700e1a1a23dd in IA__xfconf_channel_get_string xfconf/xfconf/xfconf-channel.c:804
    #5 0x700e0f7561b0 in notification_plugin_menu_new panel-plugin/notification-plugin-log.c:143
    #6 0x700e0f752971 in notification_plugin_popup_menu panel-plugin/notification-plugin.c:57
[...snip...]

Direct leak of 9 byte(s) in 1 object(s) allocated from:
    #0 0x700e1bafd891 in malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x700e184b8b87 in g_malloc glib/gmem.c:100
    #2 0x700e18520ecf in g_strdup glib/gstrfuncs.c:323
    #3 0x700e1a1a23dd in g_strdup_inline /usr/local/include/glib-2.0/glib/gstrfuncs.h:321
    #4 0x700e1a1a23dd in IA__xfconf_channel_get_string xfconf/xfconf/xfconf-channel.c:804
    #5 0x700e0f75615b in notification_plugin_menu_new panel-plugin/notification-plugin-log.c:140
    #6 0x700e0f752971 in notification_plugin_popup_menu panel-plugin/notification-plugin.c:57
[...snip...]

Testing

  • No issues were detected when testing the patch with ASan + LSan

Merge request reports

Loading