all repos — tint2 @ 89e4a5a4609e85ae406cee14affdfbf3283429aa

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

Fix crash in tint2conf (wrong string length in allocation)
o9000 o9000
commit

89e4a5a4609e85ae406cee14affdfbf3283429aa

parent

2ebc75944e1337a5f68ee85849029094c153584c

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/util/common.csrc/util/common.c

@@ -117,13 +117,13 @@ const gchar *home = g_get_home_dir();

if (!home) return strdup(s); - char *home_slash = calloc(strlen(home) + 1, 1); + char *home_slash = calloc(strlen(home) + 2, 1); strcat(home_slash, home); strcat(home_slash, "/"); if ((strcmp(s, home) == 0 || strstr(s, home_slash) == s)) { - char *result = calloc(strlen(s) - strlen(home) + 1, 1); + char *result = calloc(strlen(s) - strlen(home) + 2, 1); strcat(result, "~"); strcat(result, s + strlen(home)); free(home_slash);