From 4f2b2b5b946c211f97b4bbfa5a273c9c7327d203 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Wed, 13 Sep 2023 11:21:51 -0500 Subject: common: fix a segfault in str_split Fix a bug in which str_split would segfault when the string is misformatted. Signed-off-by: Danny Holman --- common/include/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/include/util.h') diff --git a/common/include/util.h b/common/include/util.h index 39c130b..66221b2 100644 --- a/common/include/util.h +++ b/common/include/util.h @@ -8,6 +8,6 @@ (type*)((char*)__mptr - offsetof(type, member)); }) char* str_strip(char *str); -char** str_split(char *str, const char *delim); +size_t str_split(char*** arr, char *str, const char *delim); #endif -- cgit v1.2.3