commit 06838e29d367046b9304b392d58ff7075d51c1e1
Author: jon <[email protected]>
Date: Mon Jul 13 09:52:19 2020 +0200
fixed 100% BROKEN CODE
diff --git
a/dwm.suckless.org/patches/autostart/dwm-autostart-20200610-cb3f58a.diff
b/dwm.suckless.org/patches/autostart/dwm-autostart-20200610-cb3f58a.diff
index 5245ace2..7e174247 100644
--- a/dwm.suckless.org/patches/autostart/dwm-autostart-20200610-cb3f58a.diff
+++ b/dwm.suckless.org/patches/autostart/dwm-autostart-20200610-cb3f58a.diff
@@ -82,7 +82,7 @@ index 4465af1..2156b49 100644
static char stext[256];
static int screen;
static int sw, sh; /* X display screen geometry width, height */
-@@ -1380,6 +1386,81 @@ run(void)
+@@ -1380,6 +1386,83 @@ run(void)
handler[ev.type](&ev); /* call handler */
}
@@ -127,10 +127,12 @@ index 4465af1..2156b49 100644
+ /* the XDG conformant path does not exist or is no directory
+ * so we try ~/.dwm instead
+ */
-+ if (realloc(pathpfx, strlen(home) + strlen(dwmdir) + 3) ==
NULL) {
++ char *pathpfx_new = realloc(pathpfx, strlen(home) +
strlen(dwmdir) + 3);
++ if(pathpfx_new == NULL) {
+ free(pathpfx);
+ return;
+ }
++ pathpfx = pathpfx_new;
+
+ if (sprintf(pathpfx, "%s/.%s", home, dwmdir) <= 0) {
+ free(pathpfx);