From 0c3406ff62fb6bfff04844dd6153113856aca3cf Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Sat, 21 Jan 2023 12:56:54 -0800
Subject: [PATCH] strListJoin() will now fail gracefully (return NULL) if
 passed NULL buf

No immediate need/use.
---
 src/xpdev/str_list.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xpdev/str_list.c b/src/xpdev/str_list.c
index 7c5d2577a6..51e37b03db 100644
--- a/src/xpdev/str_list.c
+++ b/src/xpdev/str_list.c
@@ -702,7 +702,7 @@ char* strListJoin(const str_list_t list, char* buf, size_t buflen, const char* s
 {
 	size_t		i;
 
-	if(buflen < 1)
+	if(buf == NULL || buflen < 1)
 		return NULL;
 
 	*buf = '\0';
-- 
GitLab