This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository e16.

View the commit online.

commit 050d310ce6bfc4b91f3f15e2d9f11ec96460c13a
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Mon Jun 26 16:50:12 2023 +0200

    ipc: Avoid potential crash in AclassConfigParseIpc()
    
    Also, let AclassConfigLineParse() deal with comments.
---
 src/aclass.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/aclass.c b/src/aclass.c
index 2223ff85..d1434296 100644
--- a/src/aclass.c
+++ b/src/aclass.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2004-2021 Kim Woelders
+ * Copyright (C) 2004-2023 Kim Woelders
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -782,12 +782,15 @@ AclassConfigParseIpc(const char *p)
    if (!s)
       return;
 
-   for (;; s += len + 1)
+   for (len = 1; len > 0; s += len)
      {
-	len = strcspn(s, "#\r\n");
+	len = strcspn(s, "\r\n");
 	if (len <= 0)
 	   break;
-	s[len] = '\0';
+	if (s[len] == '\0')
+	   len = 0;
+	else
+	   s[len++] = '\0';
 
 	AclassConfigLineParse(s, &ac, &aa);
      }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to