[wiki] [sites] [dwm][patch][ipc] Update patch to v1.5.7 || Mihir Lad

From: <git_AT_suckless.org>
Date: Fri, 06 Nov 2020 18:18:18 +0100

commit 31432a20e694b31a09eb803f077463d210f2c757
Author: Mihir Lad <mihirlad55_AT_gmail.com>
Date: Fri Nov 6 12:18:25 2020 -0500

    [dwm][patch][ipc] Update patch to v1.5.7

diff --git a/dwm.suckless.org/patches/ipc/dwm-ipc-20201031-f04cac6.diff b/dwm.suckless.org/patches/ipc/dwm-ipc-20201106-f04cac6.diff
similarity index 99%
rename from dwm.suckless.org/patches/ipc/dwm-ipc-20201031-f04cac6.diff
rename to dwm.suckless.org/patches/ipc/dwm-ipc-20201106-f04cac6.diff
index a07b5150..5d947f65 100644
--- a/dwm.suckless.org/patches/ipc/dwm-ipc-20201031-f04cac6.diff
+++ b/dwm.suckless.org/patches/ipc/dwm-ipc-20201106-f04cac6.diff
_AT_@ -1,6 +1,6 @@
-From a11b738714b35eab3847211f019b47b7290595c5 Mon Sep 17 00:00:00 2001
+From 9c4c16485ac374583a1055ff7c26cba53ac92c05 Mon Sep 17 00:00:00 2001
 From: mihirlad55 <mihirlad55_AT_gmail.com>
-Date: Sat, 31 Oct 2020 15:32:39 +0000
+Date: Fri, 6 Nov 2020 17:13:42 +0000
 Subject: [PATCH] Add IPC support through a unix socket
 
 This patch currently supports the following requests:
_AT_@ -275,7 +275,7 @@ index 7084c33..8570938 100644
  CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
 diff --git a/dwm-msg.c b/dwm-msg.c
 new file mode 100644
-index 0000000..0071781
+index 0000000..1971d32
 --- /dev/null
 +++ b/dwm-msg.c
 _AT_@ -0,0 +1,548 @@
_AT_@ -780,7 +780,7 @@ index 0000000..0071781
 + }
 +
 + int i = 1;
-+ if (strcmp(argv[i], "--ignore-reply") == 0) {
++ if (i < argc && strcmp(argv[i], "--ignore-reply") == 0) {
 + ignore_reply = 1;
 + i++;
 + }
_AT_@ -3242,5 +3242,5 @@ index 0000000..ee9948e
 +
 +#endif // YAJL_DUMPS_H_
 --
-2.29.0
+2.29.2
 
diff --git a/dwm.suckless.org/patches/ipc/dwm-ipc-v1.5.5-to-v1.5.6.diff b/dwm.suckless.org/patches/ipc/dwm-ipc-v1.5.5-to-v1.5.6.diff
deleted file mode 100644
index ef1766de..00000000
--- a/dwm.suckless.org/patches/ipc/dwm-ipc-v1.5.5-to-v1.5.6.diff
+++ /dev/null
_AT_@ -1,26 +0,0 @@
-From b1715f81a342efc118da2f07b1c0d8a639b96a95 Mon Sep 17 00:00:00 2001
-From: mihirlad55 <mihirlad55_AT_gmail.com>
-Date: Sat, 31 Oct 2020 15:32:39 +0000
-Subject: [PATCH] Update from v1.5.5 to v1.5.6
-
-- Fix ARG_TYPE_NONE passing non-zero value to functions
----
- ipc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/ipc.c b/ipc.c
-index e527e23..c404791 100644
---- a/ipc.c
-+++ b/ipc.c
-_AT_@ -362,7 +362,7 @@ ipc_parse_run_command(char *msg, IPCParsedCommand *parsed_command)
-     *args = (Arg *)malloc(sizeof(Arg));
-     *arg_types = (ArgType *)malloc(sizeof(ArgType));
-     (*arg_types)[0] = ARG_TYPE_NONE;
--    (*args)[0].f = 0;
-+    (*args)[0].i = 0;
-     (*argc)++;
-   } else if (*argc > 0) {
-     *args = (Arg *)calloc(*argc, sizeof(Arg));
--- 
-2.29.0
-
diff --git a/dwm.suckless.org/patches/ipc/dwm-ipc-v1.5.6-to-v1.5.7.diff b/dwm.suckless.org/patches/ipc/dwm-ipc-v1.5.6-to-v1.5.7.diff
new file mode 100644
index 00000000..7d954b3b
--- /dev/null
+++ b/dwm.suckless.org/patches/ipc/dwm-ipc-v1.5.6-to-v1.5.7.diff
_AT_@ -0,0 +1,26 @@
+From 78faf6fdd0ab3664ea9fc2cdeb61558ebe5db2ef Mon Sep 17 00:00:00 2001
+From: mihirlad55 <mihirlad55_AT_gmail.com>
+Date: Fri, 6 Nov 2020 17:13:42 +0000
+Subject: [PATCH] Update from v1.5.6 to v1.5.7
+
+* Fix segfault when running dwm-msg with no arguments
+---
+ dwm-msg.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dwm-msg.c b/dwm-msg.c
+index 0071781..1971d32 100644
+--- a/dwm-msg.c
++++ b/dwm-msg.c
+_AT_@ -499,7 +499,7 @@ main(int argc, char *argv[])
+   }
+ 
+   int i = 1;
+-  if (strcmp(argv[i], "--ignore-reply") == 0) {
++  if (i < argc && strcmp(argv[i], "--ignore-reply") == 0) {
+     ignore_reply = 1;
+     i++;
+   }
+-- 
+2.29.2
+
diff --git a/dwm.suckless.org/patches/ipc/index.md b/dwm.suckless.org/patches/ipc/index.md
index 1b45191b..e43d46bc 100644
--- a/dwm.suckless.org/patches/ipc/index.md
+++ b/dwm.suckless.org/patches/ipc/index.md
_AT_@ -64,10 +64,10 @@ creating custom shell scripts to control dwm.
 
 Download
 --------
-* IPC Patch v1.5.6:
-  [dwm-ipc-20201031-f04cac6.diff](dwm-ipc-20201031-f04cac6.diff)
-* IPC Patch v1.5.5 to v1.5.6 Update:
-  [dwm-ipc-v1.5.5-to-v1.5.6.diff](dwm-ipc-v1.5.5-to-v1.5.6.diff)
+* IPC Patch v1.5.7:
+  [dwm-ipc-20201106-f04cac6.diff](dwm-ipc-20201106-f04cac6.diff)
+* IPC Patch v1.5.6 to v1.5.7 Update:
+  [dwm-ipc-v1.5.6-to-v1.5.7.diff](dwm-ipc-v1.5.6-to-v1.5.7.diff)
 
 The latest releases of the patch will always be available first on the project
 [Releases](https://github.com/mihirlad55/dwm-ipc/releases) page. There are also
Received on Fri Nov 06 2020 - 18:18:18 CET

This archive was generated by hypermail 2.3.0 : Fri Nov 06 2020 - 18:24:43 CET