Skip to content

Double free / Core dump if XDG_CONFIG_DIRS is set #957

@xaverdh

Description

@xaverdh

Explicitly set the environment variable XDG_CONFIG_DIRS to something with more then 23 characters and try running

dunst --help

observe

free(): double free detected in tcache 2

(presumably from libc) followed by a core dump.

I think the double free occurs due to

gchar * const xdg_config_dirs = xdg_cdirs && strnlen((gchar *) xdg_cdirs, 1)
as explained here: NixOS/nixpkgs#143043 (comment)

Installation info

  • Version: 1.7.0
  • Install type: package
  • Distro and version: NixOS 21.11.20211026.113fcf3 (Porcupine)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions