aboutsummaryrefslogtreecommitdiff
path: root/xs_regex.h
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2026-02-23 07:15:28 +0100
committergrunfink <grunfink@comam.es>2026-02-23 07:15:28 +0100
commitdf02bc02df1e9853c7af285cd726c800c0d9df25 (patch)
tree5164b64ecc06cc55e2ae8a8c56e347e1e7ea5aa5 /xs_regex.h
parentb90a1176d7c4a32395afdcc6ec052346276adcd4 (diff)
Fixed possible crash in xs_regex_split_n().
Diffstat (limited to 'xs_regex.h')
-rw-r--r--xs_regex.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xs_regex.h b/xs_regex.h
index 5ccefda..a2792c7 100644
--- a/xs_regex.h
+++ b/xs_regex.h
@@ -58,7 +58,7 @@ xs_list *xs_regex_split_n(const char *str, const char *rx, int count)
}
/* add the rest of the string */
- list = xs_list_append(list, p);
+ list = xs_list_append(list, xs_is_string(p) ? p : "");
regfree(&re);